Jump to content

Play a sound file with SoundPlay Does not work.


Go to solution Solved by mistersquirrle,

Recommended Posts

Hi guys I have downloaded a .WAV sound I have stored it in a different disk than C. I have saved it in a folder and then in another folder.
When I use the example in the documentation it works.

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


I have also tried to put the path in a different way and it doesn't work, can anyone guide me?

This is what I have tried

SoundPlay(@WindowsDir & "D:\MyFolder\Example\sound.wav", 1)
SoundPlay(@WindowsDir & "D:/MyFolder/Example/sound.wav", 1)

 

Link to comment
Share on other sites

  • Solution

Why are you using @WindowsDir? Keep in mind that that's a macro used to point to your Windows folder, so for me it's: C:\WINDOWS

This means your paths are:

  • C:\WINDOWS\media\tada.wav
  • C:\WINDOWSD:\MyFolder\Example\sound.wav

That first one should be correct, but the second one definitely isn't. Does "D:\MyFolder\Example\sound.wav" work without @WindowsDir?

Also, you may have whatever process is playing the sound muted in your Volume Mixer. I would try playing the sound in a loop and look at the volume mixer for what's the playing the sound and make sure it's not muted. The SoundPlay example for tada.wav worked for me.

We ought not to misbehave, but we should look as though we could.

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