Jump to content
Sign in to follow this  

_SoundPlay on latest beta

Recommended Posts



Can anyone confirm that this script:

#include <sound.au3>

Until False

Doesn't play on autoit version

It plays the song in my prod

The directshow audio decoder icon shows up in the tray when running on beta, but no sound :P

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

Share this post

Link to post
Share on other sites

Does the sample script work for you?

#include <Sound.au3>
;open sound file
$sound = _SoundOpen(@WindowsDir & "\media\Windows XP Startup.wav", "Startup")
If @error = 2 Then
    MsgBox(0, "Error", "The file does not exist")
ElseIf @error = 3 Then
    MsgBox(0, "Error", "The alias was invalid")
ElseIf @extended <> 0 Then
    $extended = @extended;assign because @extended will be set after DllCall
    $stText = DllStructCreate("char[128]")
    $errorstring = DllCall("winmm.dll","short","mciGetErrorStringA","str",$extended,"ptr",DllStructGetPtr($stText),"int",128)
    MsgBox(0, "Error", "The open failed." & @CRLF & "Error Number: " & $extended & @CRLF & "Error Description: " & DllStructGetData($stText, 1) & @CRLF & "Please Note: The sound may still play correctly.")
    MsgBox(0, "Success", "The file opened successfully")
_SoundPlay($sound, 1)


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.