RawSourceWaveStream volume control and playback time estimation with Naudio <p>I'm using Naudio to play audio samples from memory.</p> <pre><code> private RawSourceWaveStream waveStream; private MemoryStream ms; private int sampleRate = 48000; private IWavePlayer wavePlayer; //generate sine wave signal short[] buffer = new short[(int)Math.Round(sampleRate * 10.00)]; double amplitude = 0.25 * short.MaxValue; double frequency = 1000; for (int n = 0; n &lt; buffer.Length; n++) { buffer[n] = (short)(amplitude * Math.Sin((2 * Math.PI * n * frequency) / sampleRate)); } byte[] byteBuffer = new byte[buffer.Length * sizeof(short)]; Buffer.BlockCopy(buffer, 0, byteBuffer, 0, byteBuffer.Length); //create audio player to play samples from memory ms = new MemoryStream(byteBuffer); waveStream = new RawSourceWaveStream(ms, new WaveFormat(sampleRate, 16, 1)); //wavePlayer = new WaveOutEvent(); wavePlayer = new DirectSoundOut(); wavePlayer.Init(waveStream); wavePlayer.PlaybackStopped += wavePlayer_PlaybackStopped; </code></pre> <p>I want to control the Volume of <code>RawSourceWaveStream</code> for each stream separately. (I will play multiple streams). </p> <p>1) It's enough to use <code>wavePlayer.Volume = volumeSlider1.Volume;</code>? It is deprecated.</p> <p>2) I see that <code>AudioFileReader</code> make use of <code>SampleChannel</code> for Volume control. If i rewrite Read method for <code>RawSourceWaveStream</code> and add Volume Property should this be a good solution?</p> <p>3) I want playback time estimation as best as possible (at millisecond level). I saw that the time resolution of <code>WaveOutEvent</code> is about hundred of milliseconds. The time resolution of <code>DirectSoundOut</code> is better, but still not enough.</p> <p>Thank you in advance!</p>