🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Setting Master Volume

Started by
2 comments, last by GameDev.net 24 years, 6 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.
Advertisement
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);


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