Changing Master Volume in C++ [Solved]
Hey anyone got a simple example of how to ajust the master volume in C++? I cant seem to find any good tutorials or documentation, surely this is possible?
Edit: im not talking about using sliders in a GUI either, im developing in DirectX and i have two custom buttons that i want to volume to turn the system volume up or down a set amount.
[Edited by - Chett2001 on June 3, 2007 11:13:09 AM]
Awesome, i got it working but for some reason when i try to place the volume at max the balance moves all the way to the left speaker it specifies in the MSDN this:
"If a device does not support both left and right volume control, the low-order word of dwVolume specifies the volume level, and the high-order word is ignored."
heres the code:
waveOutSetVolume(audioDevice,(0xFFFF);
What do a need to change? my appologies if im being dense :(
edit: i get it, i just needed to change the DWORD value to 0xFFFFFFFF because my device supports left and right volume control.. Well its working so i guess thats right !!
"If a device does not support both left and right volume control, the low-order word of dwVolume specifies the volume level, and the high-order word is ignored."
heres the code:
waveOutSetVolume(audioDevice,(0xFFFF);
What do a need to change? my appologies if im being dense :(
edit: i get it, i just needed to change the DWORD value to 0xFFFFFFFF because my device supports left and right volume control.. Well its working so i guess thats right !!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement