I have an application which needs to play multiple audio files using nAudio but I want to mute any one when I want to. I set the Volume property of the instance of the WaveOut i want to Zero.
myWaveOut.Volume=0;
The problem is when I do that all the audio out of that application mutes. Even thou all the audio uses its own instance of WaveOut.
Why is this happening, and how can I resolve it?
The WaveOut.Volume property sets the device volume. To set the stream volume, insert a VolumeSampleProvider into your signal chain, or more simply just use the AudioFileReader class which has a Volume property.
Separate audio channels volume is adjusted in other way than the main volume. There is quite related discussion on NAudio codeplex page .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.