Search code examples
c#naudiowaveformchannel

NAudio display both channels in WaveViewer


I am using NAudio's WaveViewer UI control where I display the waveform using

this.customWaveViewer1.WaveStream = new NAudio.Wave.WaveFileReader(filename);

I am wondering how can I display each channel in it's own WaveViewer?


Solution

  • WaveViewer is a very simple example of how to show waveforms. If you want stereo, I'd recommend copying the source code for it, and modifying the OnPaint method to draw two lines, one for the left channel and one for the right.