Jump to content
leuce

What kinds of WAV files with SoundPlay?

Recommended Posts


 

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

Run the script you made in x64 that plays the wav file with the following command :

#AutoIt3Wrapper_UseX64=y

 

Share this post


Link to post
Share on other sites
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.

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...