开发者

Mute other applications' sound when my application is playing a sound

I would like to mute other applications sounds when my application is playing a sound. I know that this is possible in Windows 7 because it allows sound control on a per-application basis.

The specific scenario is my app needs to have its sound play exclusively; if other applications (eg Winamp, Media Player Classic etc) are playing a sound, they should be muted for the duration of the sound played by my application.

I would like to开发者_Go百科 know how it can be done using Delphi? Which library/system call?


I doubt this is easily achieved.

What if the other apps took the same view? Suppose another app decided that it wanted its sound to play and mute all other apps. Which app would win?


On Vista & above you can do this by using CoreAudio/WASAPI & an exclusive mode stream.


Mumble is doing this, you can look at source code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜