lee321987 Posted April 2, 2010 Posted April 2, 2010 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
GodlessSinner Posted April 2, 2010 Posted April 2, 2010 #include <Sound.au3> $sound = _SoundOpen(@WindowsDir & "\media\tada.wav") _SoundPlay($sound, 1) MsgBox(0, "", "Played") _____________________________________________________________________________
lee321987 Posted April 2, 2010 Author Posted April 2, 2010 #include <Sound.au3> $sound = _SoundOpen(@WindowsDir & "\media\tada.wav") _SoundPlay($sound, 1) MsgBox(0, "", "Played") Still doesn't wait. Thanks though.
GodlessSinner Posted April 2, 2010 Posted April 2, 2010 Still doesn't wait.Thanks though.- Then I don't know: Posted example works for me, playing sound before MsgBox() (using Autoit v3.3.0.0) _____________________________________________________________________________
crashdemons Posted April 2, 2010 Posted April 2, 2010 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.)
lee321987 Posted April 2, 2010 Author Posted April 2, 2010 (edited) 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 April 2, 2010 by lee321987
JackDinn Posted January 4, 2012 Posted January 4, 2012 (edited) 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 January 4, 2012 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
guinness Posted January 4, 2012 Posted January 4, 2012 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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
JackDinn Posted January 5, 2012 Posted January 5, 2012 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now