Jump to content

What kinds of WAV files with SoundPlay?


leuce
 Share

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

Link to comment
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.

Link to comment
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

Link to comment
Share on other sites

  • 3 weeks later...
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

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