Advertisement

Setting Master Volume

Started by December 26, 1999 01:14 PM
2 comments, last by GameDev.net 25 years, 2 months ago
That is not toyaly correct. If you manage the primary buffer you loose hardware control. It sounds like your problem is that your not setting the primary buffer to Play reatidly.
I don't know if this is what you want, but this will set the wave device volume. Hope this help.
waveOutOpen(&WaveOut,WAVE_MAPPER,NULL,NULL,NULL,CALLBACK_NULL);
waveOutSetVolume(WaveOut,FxVol);
waveOutClose(WaveOut);

PS : FxVol is a DWORD value (16 bit each for left and right volume);

Advertisement

I have the DirectSound working OK now.
However I want to include a master
audio volume controller. I looked at the DirectSound doc and it seemed to
say to alter the volume on the primary
buffer. I did this but the frame rate on
my game dropped by about 5. I read that
if you access the primary buffer the secondary buffers loose hardware support.
Is there another way to implement a master
volume control?
one more thing....
Wave out variable type :

HWAVEOUT WaveOut;

This topic is closed to new replies.

Advertisement