Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QuietMode = 0
- IniRead, EditSoundThreshold, Config.ini, Options, EditSoundThreshold, 50
- IniRead, EditReduceSound, Config.ini, Options, EditReduceSound, 80
- DllCall("winmm.dll\mciSendString", "Str", "open new alias MediaControlInterface type waveaudio wait")
- DllCall("winmm.dll\mciSendString", "Str", "set MediaControlInterface time format milliseconds wait")
- VarSetCapacity(MicrophoneVolume,100)
- DllCall("QueryPerformanceFrequency", "Int64*", QueryPerformanceFrequency)
- Gui, +AlwaysOnTop +LastFound +Resize +ToolWindow -Caption MinSize MaxSize
- If (DllCall("dwmapi\DwmIsCompositionEnabled", "UInt*", IsEnabled) = 0){
- Gui, Color, 0xFFFFFE
- VarSetCapacity(rect, 16, -1)
- DllCall("dwmapi\DwmExtendFrameIntoClientArea", "UInt", WinExist(), "uint", &rect)
- WinSet, TransColor, 0xFFFFFE
- }
- Gui, Font, cBlack s16, Segoe UI
- Gui, Add, Text, x0 y0 gTextTitle, Options
- Gui, Font, s9
- Gui, Add, Text, x230 y15 w28 Disabled vTextMicrophoneVolume
- Gui, Add, Text, x20 y30, Sound Threshold
- Gui, Add, Text, x20 y50, Reduce all sounds by
- Gui, Add, Text, x230 y50, `%
- Gui, Add, Text, x20 y70, Output Device
- Gui, Font, s8, Segoe UI Light
- Gui, Add, Edit, x165 y25 w60 h20 gEditSoundThreshold vEditSoundThreshold
- Gui, Add, UpDown,, %EditSoundThreshold%
- Gui, Add, Edit, x165 y45 w60 h20 gEditReduceSound vEditReduceSound
- Gui, Add, UpDown,, %EditReduceSound%
- Gui, Add, DropDownList, x165 y65 w60 h20
- Gui, Add, Progress, x80 y15 h10 w145 -Smooth vProgressMicrophoneVolume
- Gui, Show, w260 h90 Hide
- Menu, Tray, NoStandard
- Menu, Tray, Add, Options, MenuHandler
- SetTimer, CheckVolume, 0
- Return
- CheckVolume:
- DllCall("winmm.dll\mciSendString", "Str", "status MediaControlInterface level", "Str", MicrophoneVolume, "UInt", 100, "UInt", 0, "Cdecl Int")
- GuiControl,, ProgressMicrophoneVolume, % (MicrophoneVolume *= 0.78125)
- GuiControl,, TextMicrophoneVolume, % Round(MicrophoneVolume) "%"
- Return
- TextTitle:
- If (A_GuiEvent = "DoubleClick")
- Gui, Hide
- Else
- PostMessage, 0xA1, 2,,, A
- Return
- EditSoundThreshold:
- EditReduceSound:
- GuiControlGet, %A_ThisLabel%
- IniWrite, % %A_ThisLabel%, Config.ini, Options, %A_ThisLabel%
- Return
- MenuHandler:
- If (A_ThisMenuItem = "Options")
- Gui, Show
- *Ctrl::ExitApp
Add Comment
Please, Sign In to add comment