I've learned everything I can about WinMM (opening/closing mixers, enumerating controls, etc.) Where I'm stumped is that it seems WPF's MediaElement ignores my settings through WinMM, but Window's Volume Mixer shows I'm correctly changing the settings.
So I can essentially mute the volume with my control, see that it's muted in the Volume Mixer, play the sound and hear it, then double click the mute button in the Volume Mixer, play the sound and not hear it.
Something is done through the Window's Volume Mixer that is more than just WinMM api calls, but the display is using WinMM settings.
Is there something I'm missing?
I've used every line, and only Speaker/WaveOut work. I'm getting the Volume and Mute controls from the line and both have the same effect.
This is only the MediaElement causing this. If I play a sound through WinMM or if I have a native control or explorer embedded, I can mute that with my volume control.
My first theory is that because I'm testing in Windows7, the MediaElement is assigned to a separate session than the application's default session, and somehow the Volume Mixer is affecting all sessions in an application. At which point I'd have to choose depending on OS whether to use WinMM or WASAPI. If that's true, then WinMM really isn't supported like Windows claims (for backwards compatibility), but maybe they meant for older technologies (like Winforms and AFX/MFC).
EDIT: I'm using the code at this answer: https://stackoverflow.com/a/294525/491837