View Single Post
  #2 (permalink)  
Old 06-22-2008, 09:15 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 858
Last Blog:
Programs Under the Hoo...
Credits: 0
Rep Power: 13
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default Re: Sound Problems :D

First you need to get the handle of the sound device you're using, then pass in the handle and volume to the waveOutSetVolume function:

Code:
HWAVEOUT  hSpeaker = NULL;

//You need to fill this structure out depending on what sound you're using
WAVEFORMATEX  soundData;

//get handle to speaker
waveOutOpen(&hSpeaker,WAVE_MAPPER,&soundData,NULL,CALLBACK_NULL);

//speaker now opened for output. Set the volume.
waveOutSetVolume(hSpeaker,/*your volume here, 0xFFFF is max*/);

//do your thing.
Reply With Quote