Search code examples
c++winapivisual-c++win32guiwin32-process

How to control application volume in WinXP


I would like to programatically control the volume of a particular application in WinXP. I came to know abt one API waveOutSetVolume(), but it controls the application volume in Win Vista & Above, for XP it just affect the entire system volume.

Please advise how can we achieve this in XP?

Moreover how to Uncheck/Check the SYstem volume Mute check box as well.


Solution

  • As you said, application-level audio levels are available from Vista OS, so XP has no ability to control it.

    More info here: http://msdn.microsoft.com/en-us/library/bb945061.aspx

    Your second question related to mute, you simply call waveOutSetVolume:

    http://msdn.microsoft.com/en-us/library/windows/desktop/dd743874%28v=vs.85%29.aspx