views:

212

answers:

1

I'm using the old good Mixer API right now, but it does not work as expected on Windows Vista & 7 in the normal, not in XP compatibility mode. It mutes the sound for the current app only, but I need a global (hardware) mute. How to rearch the goal? Is there any way to code this w/o COM interfaces and strange calls, in pure C/C++?

+1  A: 

The audio stack was significantly rewritten for Vista. Per-application volume and mute control was indeed one of the new features. Strange calls will be required to use the IAudioEndpointVolume interface.

Hans Passant
Could you give a working sample for the problem stated above? Is there any way to abstain from COM, and to write the code in pure C or C++?
Dmitry Kramarov
You've lived a blessed life if you never wrote any COM code before. There's no way around it. You can get a code sample from the guy that designed the interface. Link: http://blogs.msdn.com/larryosterman/archive/2007/03/06/how-do-i-change-the-master-volume-in-windows-vista.aspx
Hans Passant