Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: Use of WaveViewer control with raw streams

$
0
0

I am trying to use the WaveViewer control to visualize a raw stream with 8bit, 8k data. The issue I am having is that the WaveViewer displays a nearly all black waveform (appears like extreme clipping) that looks normal in Audacity. How do I control the appearance so that it looks as expected. I would also like to change the color of the graph if possible, but when I change the color property nothing happens.

private void ShowActivePhrase(string path)
{
        FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read);
        WaveFormat format = new WaveFormat(8000, 8, 1);
        WaveStream rawStream = new RawSourceWaveStream(file, format);
        waveViewer1.SamplesPerPixel = 24;
        waveViewer1.WaveStream = rawStream;
}


Viewing all articles
Browse latest Browse all 5831

Trending Articles