Volume control

BlitzPlus Forums/BlitzPlus Programming/Volume control

Adam Novagen(Posted 2007) [#1]
Hey, I've been wondering something: is it possible to change the actual volume setting for the player's computer?


Adam Novagen(Posted 2007) [#2]
What, no ideas?


Réno(Posted 2007) [#3]
With the basics commands, you can't ( see the doc ).

Use "ChannelVolume" ;)


Adam Novagen(Posted 2007) [#4]
Crap... I was wondering if executing "soundvol.exe" with a command line would do the trick... Ah well.


b32(Posted 2007) [#5]
You can use an API to change the volume. In winmm.dll, there is a command called WaveOutSetVolume that changes the wave volume. The first parameter should be 0, the second one should be in the range 0..65536.
I found the winmm.decls here: www.blitzforum.de/forum/viewtopic.php?t=3915
When I tried, the (windows) mixer window didn't show the changes, but the volume did change.