What is the maximum sound level?

I create a small alarm that should set the speaker volume to maximum before starting the alarm. Everything works, but I don’t know what is the maximum value for the speakers. Do any of you know this or know where I can find it?

This is how I set the speaker volume:

defaultDevice.AudioEndpointVolume.MasterVolumeLevel = 1; 

BR

+4
source share
3 answers

With your hint, I found the answer. The correct answer for my problem:

 defaultDevice.AudioEndpointVolume.MasterVolumeLevel = defaultDevice.AudioEndpointVolume.VolumeRange.MaxdB; 

thanks for the help

+4
source

Take a look at IAudioEndpointVolume :: API GetVolumeRange . This will give you a decibel volume range.

+2
source

If you use the IAudioEndpointVolume interface, it has a GetVolumeRange method that gets the volume range in decibels.

+1
source

Source: https://habr.com/ru/post/1386080/


All Articles