Hello,
Platform: Windows
I wish to use RR to play some very short external audio files (MP3 or WAV) for a program. Actually I don't need the Play button, Rewind buttons, Pause button, etc... I just wish to play the audio file like that:
If theNumber = 3 then
## Play the short audio file 3.wav here
end if
I read the Tutorial of Callbacks from RR official website. It seems that Player may be the solution.
Could some experts here provide the guideline for me?
Thanks and best regards
How to use Player to play some short audio file (MP3 or WAV)
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
How to use Player to play some short audio file (MP3 or WAV)
Alex
Nice to meet all of you.
Nice to meet all of you.
Dear alex298,
You almost got it right:
You don't really need a player object here, but if you want to embed the sound file in your stack, you can import them (see File menu) and use the following script:
Best,
Mark
You almost got it right:
Code: Select all
if theNumber = 3 then
play "path to audio file 3.wav here"
end if
Code: Select all
if theNumber = 3 then
play "name of audio clip 3.wav here"
end if
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 111
- Joined: Sun Aug 23, 2009 7:48 am
- Contact:
Well, if alex298 wants to play "MP3 or waw" he needs to use a player as the built-in support does not support mp3 (AFAIK)Mark wrote: You don't really need a player object here, but if you want to embed the sound file in your stack, you can import them (see File menu) and use the following script:
Best,Code: Select all
if theNumber = 3 then play "name of audio clip 3.wav here" end if
Mark