views:

26

answers:

1

hi i am creating an audio editor.

i want to play audio(wave) channels(R or L) separate.

how i can do this.

A: 

If you want to extract the samples directly, for WAV files left and right channels are interleaved, meaning you get one sample from the left channel then one from the right and so on. If you know the sample size it should be fairly easy to extract samples by channel.

If you want to do this dynamically, and i.e. offer the ability to start playback anywhere I would implement a custom Stream derived class that allows you to read in only samples from the left or only samples from the right channel. Then use this stream class to feed a SoundPlayer instance.

Also check this thread: http://stackoverflow.com/questions/184683/play-audio-from-a-stream-using-c

BrokenGlass