Set volume in NAudio

I use NAudio.dllin C # application. I found that it IWavePlayerhas a property Volume, but it is deprecated.

 public interface IWavePlayer : IDisposable
    {
        [Obsolete("Not intending to keep supporting this going forward: set the volume on your input WaveProvider instead")]
        float Volume { get; set; }

       //..........................
    }

So what should I do to install the volume? Does anyone have an example of how to do this?

+3
source share
1 answer

Some of the developers IWavePlayerstill have a property Volume(for example, WaveOutand DirectSoundout do), so just keep a reference to a specific class and not to the interface. The interface IWavePlayerfeature was deprecated because not all developers can support it.

, , IWavePlayer . NAudio , , , ISampleProvider. NAudioDemo , .

+3

All Articles