Sign in to follow this  
Chett2001

Changing Master Volume in C++ [Solved]

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this