• Advertisement
Sign in to follow this  

Changing Master Volume in C++ [Solved]

This topic is 3885 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
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 !!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement