Wednesday 15 August 2012

c++ - handling specific applications volume-level -


Using WASAPI, I could control the system volume. I'm surprised, I can control the volume level program of a specific application. (Definitely, it's only after Windows 7) Is this possible?

You can control the application (session) Quantity is the same as the standard volume mixer on it Read where it has been explained in detail:

WASAPI clients can control the volume level of each individual audio session. [...]

To support this behavior, WASAPI implements the ISimpleAudioVolume interface. When the user transfers the application slider, according to the application, the call calls the ISimpleAudioVolume :: SetMasterVolume method to adjust the volume volume level. Sndvol monitors changes in volume made through this method and reflects changes in volume sliders that display it.

To search for running sessions, you can use the IAudioSessionEnumerator interface. Take a look at this code snippet / apply to apply the application:

No comments:

Post a Comment