问题
How can I retrieve the list of application audio sessions (like in Windows volume mixer) and change volume of one application (for example, Mozilla) manually (C++, Delphi)? Skype do something the same when you start talking (decreases the volume of other applications). Thanks in advance!
回答1:
To enumerate the Audio sessions you must use the IAudioSessionManager2 interface and call the GetSessionEnumerator method, this will return a IAudioSessionEnumerator interface , from here you must invoke the GetSession method to return a IAudioSessionControl interface wich provides all the functions to retrieve the info related to the audio sessions. as additional lecture try the this MSDN article Default Ducking Experience.
来源:https://stackoverflow.com/questions/11665176/managing-apps-volume-in-windows-7