It's not gonna work! (Well, not on Win9x (i think)...)
The sound is coming out through DirectSound.
Winmm.dll is the other way of playing sounds 'n' sods 'n' stuff, which uses the waveOut line, whilst DirectSound skips happily away to the sunset with it's own volume line.
You have to somehow get a handle on DB's DirectSound objects. Maybe through DLLs, maybe not...
Use the built-in DB commands:
function SetAllVolume(maxSoundNumUsed, vol)
For i=1 To maxSoundNumUsed
if sound exist(i) then set sound volume vol
Next i
endfunction
If your sounds are all at different volumes, you could make an array that remembers all their volumes, and a function to set them all back again. But if all your sounds' volumes are left alone:
To mute:
SetAllVolume(200OrWhatever, 0)
To unMute:
SetAllVolume(200OrWhatever, Whatever)
You probably knew this, but sum1's gotta find it useful..
[img src=http://blanky.pt-web.net/ddd.gif] >::p