Jump to content

Soundplay - not working when "wait" flag is set. _Soundplay - ignores "wait" flag.


Recommended Posts

Hello.

This plays no sound:

SoundPlay(@WindowsDir & "\media\tada.wav", 1)

This doesn't wait even though "wait" is set to "1":

#include <sound.au3>
_SoundPlay(@WindowsDir & "\media\tada.wav", 1)

Both functions work normally if wait is set to "0".

AutoIt v3.3.6.0

Windows 7 x64

Link to comment
Share on other sites

Hello.

This plays no sound:

SoundPlay(@WindowsDir & "\media\tada.wav", 1)

This doesn't wait even though "wait" is set to "1":

#include <sound.au3>
_SoundPlay(@WindowsDir & "\media\tada.wav", 1)

Both functions work normally if wait is set to "0".

AutoIt v3.3.6.0

Windows 7 x64

Both work for me

Have you tried checking what _SoundPlay is returning and what @error is set to?

Something like this might help:

#include <sound.au3>
$ret=_SoundPlay(@WindowsDir & "\media\tada.wav", 1)
MsgBox(0,'_SoundPlay','Return value: '&$ret&@CRLF&'Error code: '&@error&@CRLF&'Error description: '&description(@error))

Func description($err)
    Switch $err
        Case 0
            Return 'No Error'
        Case 1
            Return 'Play Failed'
        Case 2
            Return '$iWait parameter is invalid'
        Case 3
            Return 'Invalid Sound ID. Use return array from _SoundOpen() or a valid file name.'
        Case Else
            Return 'Unknown'
    EndSwitch
EndFunc

(using Au3.3.2.0)

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

Link to comment
Share on other sites

So I downgraded to 3.3.2.0 (letting the installer uninstall 3.3.6.0 first). Result: Soundplay and _Soundplay work right. Then I upgraded back to 3.3.6.0 (letting it uninstall first), and both Soundplays work now. ???

Exact actions:

Uninstall 3.3.6.0

Install 3.3.2.0

Re-install custom Autoit version of SciTE from 2010-02-28 (this is the version I was using initially).

Soundplays work.

Uninstall 3.3.2.0

Install 3.3.6.0

Re-install SciTE 2010-02-28

Soundplays work.

@crashdemons, Sorry, but I didn't run your test before it started working -- I should have done that first.

Any idea what may have happened?

Thanks for the help guys.

Edited by lee321987
Link to comment
Share on other sites

  • 1 year later...

just thought i second this error , SoundPlay($notify_sound, 1) does indeed have a problem.

It just stopped working yesterday , no reason, and then a few hours later it was working again. Then again today it stopped working again.

SoundPlay($notify_sound, 0) is working fine , iv tried resting comp.

I shall just use SoundPlay($notify_sound, 0) its no problem but i just thought id add a comment as its not just a "one off"

A.I. v3.3.6.1

Edited by JackDinn

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

JackDinn,

Firstly you're not using the latest version of AutoIt, please download V3.3.8.0 and test to see if the problem is fixed. Secondly please don't make a habit of resurrecting old threads. Thanks.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

O right, please except my apologies , it just seemed the most appropriate thread to my observations after a search to see if anyone else had ever experienced that same thing.

Yea your right about the fact i should have updated before posting though,

sorry :-)

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

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...