This project has moved and is read-only. For the latest updates, please go here.

WAV &or MP3 separate left & right channel view

Mar 4, 2012 at 11:20 AM

Hi, NAudio experts ;)

I'm new to this library, and I nedd to create application that shows separate left and right channel of a wave or mp3 audio while recording or playing sound.

I managed to draw signal on waveformPainter control while recording but i don't know how to show left and right channel on a diferent views while playing, also I managed to draw signal on one WaveViewer control that shows signal of both channels.

Since this application in future will need to handle fft on signal and all sort of other things (e.g. effects), I need access to this channels but I don't know where to start.

So if anyone could help me or provide me with information (example) how to do that I would be very gratefull.


Mar 10, 2012 at 9:46 AM

Audio samples are interleaved left, right etc, so you would need to split out the signals and send one to each of two mono waveform renderers.

Mar 13, 2012 at 6:58 PM

as mark said in a pcm stream left and right is always next to each other. this means:


how big these blocks are is stored in the waveformat. just take a look at bitspersample
that means if you have a 16bit stream each block is 2 byte long
  2     2    2    2        - byte
if you have a 24 bit stream you have to take 3 bytes... should be everything clear now :)

Mar 13, 2012 at 8:41 PM

Yes thanks ;)