Why can't I simply play a sound? I download a file from the internet. I import the sound into my program as an audiofile. then I write the code
on mouseUp
play audioclip "oops"
end mouseUp
And.. nothing happens. I get a click, and nothing else. Why doesn't this work?
It's a .wav file. I have tried it as is, opening with quicktime, opening with iTunes, etc. but still just a quick clicking sound and then nothing. What gives??
As a side note, I can get some sound files to play, but only some.
Also, how can I see which audio files I have imported? I can see fields, images, etc. in the Inspector, but no audio files. Thanks.
playing a sound
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
playing a sound
If I do this (with or without the audioclip keyword, both will work)...
play audioclip "C:\Documents and Settings\Desktop\Sounds\dave.wav"
and it will play the sound.
But when I try another sound form the same folder...
play audioclip "C:\Documents and Settings\\Desktop\Sounds\oops.wav"
and nothing happens. (of course, Quicktime will play either sound)
play audioclip "C:\Documents and Settings\Desktop\Sounds\dave.wav"
and it will play the sound.
But when I try another sound form the same folder...
play audioclip "C:\Documents and Settings\\Desktop\Sounds\oops.wav"
and nothing happens. (of course, Quicktime will play either sound)
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
To display which audioclips and videoclips are embedded in your stack, go to the 'Preferences' tab 'Application Browser' and tick the checkboxes for 'Show audio clips' and 'Show video clips'.
Now you can see the audio and video clips in your stack by using the 'Application browser' which you can find in the 'Tools' menu.
When you use audioClip and videoClip features, you're not using QuickTime directly. And Revolution may not support all variations of the AU, WAV and AIFF audio compression formats.
So if QuickTime can play it, try using a player control and point that to your audio file. Then you can use the 'start player' and 'stop player' commands to do your thing.
Jan Schenkel.
Now you can see the audio and video clips in your stack by using the 'Application browser' which you can find in the 'Tools' menu.
When you use audioClip and videoClip features, you're not using QuickTime directly. And Revolution may not support all variations of the AU, WAV and AIFF audio compression formats.
So if QuickTime can play it, try using a player control and point that to your audio file. Then you can use the 'start player' and 'stop player' commands to do your thing.
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Playing a sound
Thanks for the info. The sound that was giving me fits was a IMA ADPCM formattted sound. Revolution doesn't like it. I experimented with importing a sound and with direct access and both work with plain-jane PCM formats of wav. So I guess I just need to be careful about what format the sounds are. BTW, the sound won't play without adding the .wav to the name. (or some other endings I assume)
DGM
DGM