Hello!
I'd like to create a program witch streams sound to an another client, and replays the sound.
When I call the WaveOut.Play() method, a high pitched beep like sound is hearable (It won't show itself with zero volume, I'm sure that the Waveout.Play() produces it, and not the stream source)
In every 100ms I create a memorystream from the buffer of the microphone, and send it through network. On the another client theese memorystream objects become Enqueued into a Queue, and I call the WaveOut.Play() on each dequeued (converted into IWaveProvider) memorystream object, and call Thread.Sleep(100). It works almost flawlesly with one critical issue: that high pitched sound is present in every 100ms (I call the WaveOut.Play() in every 100ms on the freshly dequeued memorystream).
How could I make that high piched sound disappear, when WaveOut.Play() Begins to play and ends to play the 100ms long chunk? I tried to call immediately the WaveOut.volume = 0.0F and the Thread.Sleep(5) and resume the volume in every 100 ms, but it caused "choppy audio". (also timing if the sleeps is a hard thing to do.)
I am looking for your answers.