Jump to content

Detect sound played by game


Recommended Posts

Hello everybody,

It is possible to detect when a game play a sound ?

Thanks for anwsers.

You can check the status of a sound with _SoundStatus(), but I'm not sure if _SoundOpen() locks the file or not. I've never used the _Sound* functions.
Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt
Link to comment
Share on other sites

You can check the status of a sound with _SoundStatus(), but I'm not sure if _SoundOpen() locks the file or not. I've never used the _Sound* functions.

Well I've tried but he does'nt know if the sound has been played or not...

Anyhelp ?

No-life of autoit...what could be better ?LAST SCRIPTS WITH AUTO-IT : CLICK HERE
Link to comment
Share on other sites

Well I've tried but he does'nt know if the sound has been played or not...

Anyhelp ?

Can you post the code you tried?
Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt
Link to comment
Share on other sites

Try:

#Include <Sound.au3>
$sound = _SoundOpen('bombpl.wav')

While 1
    $status = _SoundStatus($sound)
    If  $status = "playing" Then
        MsgBox(0,"","Sound is playing!")
    EndIf
    Sleep(100)
WEnd
Edited by Airwolf
Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt
Link to comment
Share on other sites

Try:

#Include <Sound.au3>
$sound = _SoundOpen('bombpl.wav')

While 1
    $status = _SoundStatus($sound)
    If  $status = "playing" Then
        MsgBox(0,"","Sound is playing!")
    EndIf
    Sleep(100)
WEnd
Thanks but it doesn't work...it's because I play the sound with VLC or it's another thing ?
No-life of autoit...what could be better ?LAST SCRIPTS WITH AUTO-IT : CLICK HERE
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...