Jump to content
Sign in to follow this  
lucius

volume regulating program

Recommended Posts

lucius

Tell me please how to call a volume regulating program (sndvol32.exe in WinXP) in order that a simple slider would appear but not whole program with all the functions.

Share this post


Link to post
Share on other sites
Valuater

Here is the way to "get" the current sound level..,.

;Get Wav Sound Volume
; Author gafrost
#include <GUIConstants.au3>
MsgBox(0,"", _SoundGetWaveVolume())
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
    $Struct=0
    Return $WaveVol
EndFunc;==>_SoundGetWaveVolume

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×