Managing apps volume in Windows 7

陌路散爱 提交于 2019-11-30 04:38:48

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!