Help with changing Master Volume with waveOutSetVolume

Hi, i'm making a C++ prank program that does the following:

1-Get Cursor Position and store it as an integer

2-Detect Cursor movement in real time and compare it with the poistion stored in point 1 and if your current position and the stored position doesnt match then...

3-You get rickrolled


Everything works fine. The problem is that i want to set the volume to 100% but i cant seem to get it to work

1
2
3
4
 
waveOutSetVolume(0, -1);
PlaySound(TEXT("C:\\Users\\Public\\Music\\DeleteMe.wav"), NULL, SND_FILENAME);


Does anybody know what is wrong?
Thanks
For full volume the value for dwVolume should be 0xFFFF.
It's also a good idea to check the return value.
https://msdn.microsoft.com/en-us/library/windows/desktop/dd743874(v=vs.85).aspx
Topic archived. No new replies allowed.