playing sounds

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Poupette
Posts: 2
Joined: Tue Mar 01, 2011 10:04 am

playing sounds

Post by Poupette » Tue Mar 01, 2011 10:23 am

Hello,

I want to make a simply player with 3 buttons:

Play , pause ans stop .

in the button play I've write : play "/mysound.wav"

but instead of playing the track there's just a horrible noise :cry:

and I can't find how to stop the playing.

Is there someone to help me , please?

(and I apologize for my English)

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: playing sounds

Post by Klaus » Tue Mar 01, 2011 10:36 am

Bonjour Poupette,

create a little PANIC BUTTON:

Code: Select all

on moueup
  play stop ac
end mouseup
8)

LiveCode is VERY picky, when it comes to play sounds.
When using the "play ac..." command you can only use
UNCOMPRESSED AIF and WAV files and the compressed AU format.

But you can use a "player" object to play all other QuickTime compatible
sounds like MP3 (and video and image formats). This requires QuickTIme
to be installed on the end users machine however.

Then you can use a script to:
start player "Name of player here"
...
stop player "Name of player here"
...
set the filename of player "Name of player here" to "another_sound.WAV"
...

Best

Klaus

Poupette
Posts: 2
Joined: Tue Mar 01, 2011 10:04 am

Re: playing sounds

Post by Poupette » Thu Mar 03, 2011 12:31 pm

thank you very much for your answer.

(I'm triyng to make a simply player. )

Post Reply