Autohotkey - get recording Volume of default device's mic

0

1

I have already googled and found this: http://www.autohotkey.com/board/topic/21984-vista-audio-control-functions/. But this library dont gives what i want: i want to get the real-time recording volume of the default recording device. So if somebody makes a loud noise, there will be a pop-up. How can this be accomplished?

Dave

Posted 2013-03-30T16:40:53.373

Reputation: 103

By using function in a loop(?). – None – 2013-04-01T01:19:40.137

Yes, try using SetTimer or a Loop.

– Elliot DeNolf – 2013-04-12T14:45:06.893

Answers

1

This forum post covers how to do this: http://autohotkey.com/board/topic/32290-how-to-detect-if-a-sound-was-played/?p=205410

It uses MixMP3 along with the following script to achieve this

#Persistent
Run, Mixmp3.exe -s -50 -ql -mm,,,PID
SetTimer, SizeCheck, 100
Return

SizeCheck:
FileGetSize, Size, out.mp3, K
if (Size > 16) ;larger than 16KB
{
    ControlSend,, {ESC}, ahk_pid %PID%
    SetTimer, SizeCheck, Off
    GoTo, DoSomething
}
Return

DoSomething:
MsgBox, Sound is Playing
Exitapp

ScoWalt

Posted 2013-03-30T16:40:53.373

Reputation: 11