Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Func _SoundGetWaveVolume()
- Local $WaveVol = -1, $p, $ret
- Const $MMSYSERR_NOERROR = 0
- $p = DllStructCreate ("dword")
- If @error Then
- SetError(2)
- Return -2
- EndIf
- $ret = DllCall("winmm.dll", "long", "waveOutGetVolume", "long", -1, "long", DllStructGetPtr ($p))
- If ($ret[0] == $MMSYSERR_NOERROR) Then
- $WaveVol = Round(Dec(StringRight(Hex(DllStructGetData ($p, 1), 8), 4)) / 0xFFFF * 100)
- Else
- SetError(1)
- EndIf
- $p = 0
- Return $WaveVol
- EndFunc ;==>_SoundGetWaveVolume
Add Comment
Please, Sign In to add comment