AudioClip scripting question
Ken Norris
pixelbird at interisland.net
Thu Feb 19 02:15:30 EST 2004
Hi Thomas,
> Date: Wed, 18 Feb 2004 23:53:31 -0500
> From: Thomas McGrath III <3mcgrath at adelphia.net>
> Subject: Re: AudioClip scripting question
> on mouseDown
> repeat while the mouse is down
> play audioClip "one.au"
> wait 10 milliseconds -- or what ever seems to work best time wise
> end repeat
> end mouseDown
> NO mouseUp needed
-----------
Nope...worse. This particular handler will:
1) Cause a slew of repeated sounds in a hurry which will not stop when you
release, it will play one last full length clip (.1 sec). Needs a 'play
stop' after 'end repeat'.
2) Actually cause a break between sounds, although you have to have some
kind of break in an actual loop which deals with sound, otherwise it never
really gets a chance to get going. I wonder if there's a way to buffer it
before mouseDown.
3) Cause it to sound like data transfer (really fast machine gun).
4) Hogs the processor during the loop.
Using a separate handler (subroutine) with a 'send in time' (to itself)
structure with a kill global in the message of the mouseUp handler, won't
affect the proceesor nearly as much. Much more efficient.
But that won't help the sound problem at all :-/
Ken N.
More information about the use-livecode
mailing list