Use the waveOutSetVolume
API.
Here's an example:
DWORD dwVolume;
if (waveOutGetVolume(NULL, &dwVolume) == MMSYSERR_NOERROR)
waveOutSetVolume(NULL, 0); // mute volume
// later point in code, to unmute volume...
waveOutSetVolume(NULL, dwVolume);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…