How do I respond to sound in another application?

Can anyone give me some information / insight on how I can write an application that "listens" for sounds produced by a computer sound card or a specific other program.

For example, if I released a long-running third-party application that doesn't give any indication of when to do it, other than a loud "DING!" sound. Anyway, my application can "listen" to this "DING!" and then take some action?

I understand that there are probably ways to avoid using sound in most situations, but I'm more curious than anything else.

0


a source to share


2 answers


I can not believe it; but I found my answer on CodeProject:

http://www.codeproject.com/KB/vista/CoreAudio.aspx

Determining how loud the current "sound level" becomes becomes easier:



Dim curVol As Integer = CType(SndDevice.AudioMeterInformation.MasterPeakValue * 100, Integer)

      

So while you are trying to detect a significant increase in sound (eg loud DING!); it actually gets pretty easy.

0


a source


Does the shutdown process remain after completion? You can always keep a handle on it and bind an event handler to it.



0


a source







All Articles