This project has moved. For the latest updates, please go here.

Left and Right channel for SignalGenerator

Oct 8, 2013 at 1:54 PM
I am generating a Sine signal using the SignalGenerator class. Can someone please suggest how can I switch the output between the left only, right only and both speakers ?

How can I use the volumesampleprovider with SignalGenerator?

Thank you in advance for your help
Oct 8, 2013 at 6:51 PM
From my research I think I need to play the audio into a buffer, mute every alternate sample depending on whether we want to play it to left or right speaker, and then play the file from the buffer. But all of this has to be done on the fly. Can someone point me to a sample where this is being done?
Oct 8, 2013 at 7:27 PM
Much easier to create a StereoVolumeSampleProvider, with a LeftVolume and RightVolume property. In the Read method, read from the source (i.e. signal generator) and multiply every pair of samples by LeftVolume and RightVolume. Very simple and will give you exactly what you want.