On Jan 7, 2015, at 9:09 AM, Ray <[email protected]> wrote:

> My Mac is running 10.7.1.  The script is just two lines:
> 
> on mouseUp
>   wait until the sound is done
>   play [wavFilePath]
> end mouseUp
> 
> This works for the first click but a second click and the sound loops.  This 
> only shows up on a Mac.
> 
> The documentation regarding looping is kind of confusing.  It says it 
> specifies whether a movie "or sound" loops, but looping is a property of a 
> player, something not usually used when simply playing sound file.
> 
> Ideas?

Ray, this is a known bug that has been addressed for the next release of 6.7.x 
and 7.0.x. http://quality.runrev.com/show_bug.cgi?id=14269

Regarding your handler, typically it doesn’t make sense to use ‘wait until the 
sound is done’ until after you issue the ‘play’ command. In the order you’ve 
written it, the first time the script runs there is no sound playing so ‘the 
sound’ function returns ‘done’ immediately and goes on to the next line. If you 
then invoke the mouseUp handler again BEFORE the sound is finished playing ‘the 
sound’ will return the name of the audio clip being played. The referenced bug 
then takes over and begins playing the sound in an infinite loop.

There is a form of the ‘play’ command that allows you to loop independently of 
a player object:

  play [path to audio file] looping

HTH

Devin

Devin Asay
Office of Digital Humanities
Brigham Young University


_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to