leuce Posted December 16, 2019 Share Posted December 16, 2019 Hello I'm trying to figure out how the SoundPlay function works. If I try the example in the user manual, it works (it plays the "tada.wav" sound), and it also works with one or two of the other WAV files in Windows' media folder, but: it doesn't work for the majority of WAV files (even files that are in Windows's own media folder, i.e. siblings of tada.wav). So I'm guessing that SoundPlay only works with certain specific types of WAV files. Does anyone know what type of WAV file that is? Or perhaps my OS has something to do with it... Windows 10 Home 64. SoundPlay(@WindowsDir & "\media\chimes.wav", 1) ; plays it SoundPlay(@WindowsDir & "\media\chord.wav", 1) ; does not play it SoundPlay(@WindowsDir & "\media\ding.wav", 1) ; plays it SoundPlay(@WindowsDir & "\media\tada.wav", 1) ; plays it Thanks Samuel Link to comment Share on other sites More sharing options...
Nine Posted December 16, 2019 Share Posted December 16, 2019 There is no different WAV type of files. WAV are pure sound file with no compression. In your case, the problem seems to be Windows redirection. To prove it run chord.wav x64 instead of x86. Let me know the result. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Shark007 Posted December 16, 2019 Share Posted December 16, 2019 There are WAV files constructed with DTS audio. I attached a utility to convert those files into playable WAV files. Just drag n drop the unplayable file to the exe file. and it will create a new file. dtsWav2Wav.exe Link to comment Share on other sites More sharing options...
ripdad Posted December 17, 2019 Share Posted December 17, 2019 Not anything wrong with those wav files. "chord.wav" is less that 1 second in duration. (300ms) Some players will play it, others won't. Or rather, it seems it won't. It plays no matter what player. The problem exist in the duration of it. For example... If the player has pre-processing and buffering or not. Winamp -> no audio, but it played it. VLC -> played with audio. "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward Link to comment Share on other sites More sharing options...
leuce Posted January 3, 2020 Author Share Posted January 3, 2020 On 12/16/2019 at 1:28 PM, Nine said: To prove it run chord.wav x64 instead of x86. Sorry, I don't understand what you mean. Link to comment Share on other sites More sharing options...
leuce Posted January 3, 2020 Author Share Posted January 3, 2020 On 12/17/2019 at 2:31 AM, ripdad said: Some players will play it, others won't. Or rather, it seems it won't. It plays no matter what player. The problem exist in the duration of it. Okay, but what player does SoundPlay use to play it? Link to comment Share on other sites More sharing options...
Nine Posted January 3, 2020 Share Posted January 3, 2020 Run the script you made in x64 that plays the wav file with the following command : #AutoIt3Wrapper_UseX64=y “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
leuce Posted January 3, 2020 Author Share Posted January 3, 2020 3 minutes ago, Nine said: Run the script you made in x64 that plays the wav file with the following command... Ah, thanks, I'll try that. Link to comment Share on other sites More sharing options...
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