I have a small piece of code that I used to change the wave volume of on windows XP. I used
public static extern int waveOutGetVolume(IntPtr hwo, out uint dwVolume);
public static extern int waveOutSetVolume(IntPtr hwo, uint dwVolume);
When I use this code on windwos 7. and change volume
int NewVolume = ((ushort.MaxValue / 10) * currentVolume);
uint NewVolumeAllChannels = (((uint)NewVolume & 0x0000ffff) | ((uint)NewVolume << 16));
The volume is not getting changed. When i opened the master volume window of win7 I could see the volume level bar getting changed but the volume change was not happening.
I know there are other ways to do the same thing on windows 7 but I was just wondering why the volume is not changing if my function call is able to set the volume bar to the required level?