How to play a sound
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
How to play a sound
I'm going crazy! I had made an app with Community 6.1.1 (rc4) that played all kinds of .wav files in a subdirectory. Now I am using Commercial 6.5.2 and can't play anything at all. I actually imported a sound, "mySound.wav" into my app and then created a button with this on mouseUp command: play audioClip "mySound.wav" and I get nothing at all. And also my old app that DID play sounds now will not play sounds at all. I don't know what happened. I have a vague recollection that I need Quicktime installed, but I do not think I ever uninstalled Quicktime - if I even ever had it on my system.
Thanks very much,
asw
Thanks very much,
asw
Re: How to play a sound
Question....did you add the .wav file in the application settings/copy files section? You said you created a sub directory and I guess you mean you added the file to the copy files section of the settings....right? So make sure you do the following..
1-add the file to the copy files section of the application settings
2-import the file to stack
3- reference it like so...
on mouseUp
play audioClip "mySound.wav"
end mouseUp
1-add the file to the copy files section of the application settings
2-import the file to stack
3- reference it like so...
on mouseUp
play audioClip "mySound.wav"
end mouseUp
Re: How to play a sound
Hi asw,
I just tested this in 6.5.2 and audioClip is working.
Now I'm not being mean or anything, but when you double click the file in Explorer/Finder does it play? (yes, I'm thinking mute). Just that upgrading from one version of liveCode to another wouldn't stop a sound playing that had been playing.
Simon
I just tested this in 6.5.2 and audioClip is working.
Now I'm not being mean or anything, but when you double click the file in Explorer/Finder does it play? (yes, I'm thinking mute). Just that upgrading from one version of liveCode to another wouldn't stop a sound playing that had been playing.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: How to play a sound
Hi Larry,
is this on Windows?
As Simon says, if this has been working in 6.1.x then it will also work in 6.5.2!
Unfortunately LC is VERY picky with sound formats when using the "play ac xyz" command.
It only supports e.g uncompressed WAV and AIF files. And the "compressed by nature" AU format.
You could try to use a player object, which requires QuickTime to be installed on the machine to work.
Best
Klaus
is this on Windows?
As Simon says, if this has been working in 6.1.x then it will also work in 6.5.2!
Unfortunately LC is VERY picky with sound formats when using the "play ac xyz" command.
It only supports e.g uncompressed WAV and AIF files. And the "compressed by nature" AU format.
You could try to use a player object, which requires QuickTime to be installed on the machine to work.
Best
Klaus
Re: How to play a sound
OK, here's what I just did. I went to the folder under 6.5.2 where the .wav file is and double clicked it. It opens in Windows Media Player (my default player) and plays. My speakers are on. Then I open my app where I've imported the same file as an audio clip. I open the Application Browser and there is the .wav file showing in AudioClips in my stack. I right click on it and then click "Play" and I get nothing. So I doubt that I am doing anything wrong. I'm using Windows XP, Service Pack 3.
Re: How to play a sound
Hi asw,
I've made a test stack that I've attached, it's working here.
Simon
I've made a test stack that I've attached, it's working here.
Simon
- Attachments
-
- Untitled 1.zip
- LC 6.5.2
- (191.39 KiB) Downloaded 260 times
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: How to play a sound
I did some more testing and went back and looked at my old app where the sounds were playing. It has to do the the "flavor" of the .wav file. The one that would NOT play was 32 bit stereo. When I changed it to a 16 bit signed .wav file then it plays just fine. Thanks for your replies and now I'm posting this in case anyone else has this particular issue.
Re: How to play a sound
As I said, LC is extremely picky with sound file formats
It is about time to finally add a new multimedia engine to LC.
Dependence on Quicktime sucks, except on a Mac

It is about time to finally add a new multimedia engine to LC.
Dependence on Quicktime sucks, except on a Mac
