Jump to content
Sign in to follow this  
SAEED

Master & wave Volume Controller

Recommended Posts

SAEED

This script use memory 05, 04, 06, some times 09

so plz anyone help me to reduce memory in this script

and #include<SoundGetSetQuery.au3> is also attached under

#NoTrayIcon
#include<SoundGetSetQuery.au3>
_SoundSetWaveVolume(100)
_SoundSetMasterVolume(100)
; Wave HotKeys
HotKeySet("^!{NUMPAD5}", "WAVE_MUTE")
HotKeySet(("!{NUMPAD9}"), "WAVE_UP")
HotKeySet(("!{NUMPAD3}"), "WAVE_DOWN")
; Master Hotkeys
HotKeySet("!{NUMPAD5}", "MASTER_VOLUME_MUTE")
HotKeySet(("!{NUMPAD8}"), "MASTER_VOLUME_UP")
HotKeySet(("!{NUMPAD2}"), "MASTER_VOLUME_DOWN")
; Wave Global Variables
Global $WaveMute, $Wave_Mute_Status, $Wave_Volume_Status, $Wave_Down, $Wave_Up
;Master Global Variables
Global $MasterMute, $Master_Mute_Status, $Master_Volume_Status, $Master_Down, $Master_Up
While 1 
    Sleep(100)
; Master Query
    $Master_Mute_Status = _SoundGetMasterMute()
    $Master_Volume_Status = _SoundGetMasterVolume()
; Wave Query
    $Wave_Mute_Status = _SoundGetWaveMute()
    $Wave_Volume_Status = _SoundGetWaveVolume()
WEnd
;*******************************************************************
; Wave Functions Start
Func WAVE_MUTE();Wave Sound Mute by pressing Alt + Shift + Numpad 5
    $WaveMute = Not $WaveMute
    While $WaveMute
        Sleep(100)
        If $Wave_Mute_Status = 0 Then
            _SoundSetWaveMute(1)
            $WaveMute = Not $WaveMute
        ElseIf $Wave_Mute_Status = 1 Then
            _SoundSetWaveMute(0)
            $WaveMute = Not $WaveMute
        Else
            $WaveMute = Not $WaveMute
        EndIf
    WEnd
EndFunc  ;==>WAVE_MUTE

Func WAVE_UP();Wave Sound Up by pressing Alt + Numpad 9
    $Wave_Up = Not $Wave_Up
    While $Wave_Up
        Sleep(100)
        $Wave_Volume_Status += 5
        If $Wave_Volume_Status < 105 Then
            _SoundSetWaveVolume($Wave_Volume_Status)
            $Wave_Up = Not $Wave_Up
        Else
            $Wave_Up = Not $Wave_Up
        EndIf
    WEnd
EndFunc  ;==>WAVE_UP

Func WAVE_DOWN();Wave Sound Down by pressing Alt + Numpad 3
    $Wave_Down = Not $Wave_Down
    While $Wave_Down
        Sleep(100)
        $Wave_Volume_Status -= 5
        If $Wave_Volume_Status > -5 Then
            _SoundSetWaveVolume($Wave_Volume_Status)
            $Wave_Down = Not $Wave_Down
        Else
            $Wave_Down = Not $Wave_Down
        EndIf
    WEnd
EndFunc  ;==>WAVE_DOWN
; Wave Functions End
;*******************************************************************

;*******************************************************************
; Master Functions Start
Func MASTER_VOLUME_MUTE();Master Volume Mute by pressing Alt + Numpad 5
    $MasterMute = Not $MasterMute
    While $MasterMute
        Sleep(100)
        If $Master_Mute_Status = 0 Then
            _SoundSetMasterMute(1)
            $MasterMute = Not $MasterMute
        ElseIf $Master_Mute_Status = 1 Then
            _SoundSetMasterMute(0)
            $MasterMute = Not $MasterMute
        Else
            $MasterMute = Not $MasterMute
        EndIf
    WEnd
EndFunc  ;==>MASTER_VOLUME_MUTE

Func MASTER_VOLUME_UP();Master Volume Up by pressing Alt + Numpad 9
    $Master_Up = Not $Master_Up
    While $Master_Up
        Sleep(100)
        $Master_Volume_Status += 5
        If $Master_Volume_Status < 105 Then
            _SoundSetMasterVolume($Master_Volume_Status)
            $Master_Up = Not $Master_Up
        Else
            $Master_Up = Not $Master_Up
        EndIf
    WEnd
EndFunc  ;==>MASTER_VOLUME_UP

Func MASTER_VOLUME_DOWN();Master Volume Down by pressing Alt + Numpad 3
    $Master_Down = Not $Master_Down
    While $Master_Down
        Sleep(100)
        $Master_Volume_Status -= 5
        If $Master_Volume_Status > -5 Then
            _SoundSetMasterVolume($Master_Volume_Status)
            $Master_Down = Not $Master_Down
        Else
            $Master_Down = Not $Master_Down
        EndIf
    WEnd
EndFunc  ;==>MASTER_VOLUME_DOWN
; Master Functions End
;*******************************************************************

SoundGetSetQuery.au3

Share this post


Link to post
Share on other sites
monoceres

Huh?

What does this mean?

This script use memory 05, 04, 06, some times 09

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
SAEED

When I run this script it use CPU

04

06

09

sometimes

13

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.