views:

458

answers:

1

In windows Vista & 7*, how would you enumerate the programs which are currently playing audio (or trying to, in the event master volume is muted)? Essentially, I need the data displayed in the Volume Mixer found in the notification area.

Master volume is pretty easy: ISimpleAudioVolume::GetMasterVolume() http://msdn.microsoft.com/en-us/library/ms679156(VS.85).aspx

But nothing about particular programs is forthcoming.

*Obviously the target is Vista, but I see no reason a solution wouldn't also work in 7.

Language is irrelevant, though C# would be appreciated.

+2  A: 

Fortunately your answer is incorrect. Check out the IAudioSessionManager2 interface - the RegisterSessionNotification API is your friend.

Larry Osterman
Looks like a handy interface! However the MSDN documentation for it says it requires Windows 7 - is this true, and if so is there any equivalent for Vista?
snowcrash09
Unfortunately the API is a new addition to Windows 7.
Larry Osterman