send command hiccups?

Scott Rossi scott at tactilemedia.com
Thu May 17 02:54:55 EDT 2012


Are you delivering your stack on desktop?  When playing an imported sound,
any call to play the sound will immediately halt playback of any currently
playing sound.  One way to avoid clipping playback of a sound is to check if
the sound is "done".  You can use a repeat loop along with "if the sound is
done", or a "wait until the sound is done".  Another option could be to
employ a couple of players so playback of sounds *can* overlap -- assign the
bell sound to both players and alternate playback of each player.

If you're delivering on mobile, you might see the release notes under
Multi-channel sound support.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design



Recently, Nicolas Cueto wrote:

> Hello All,
> 
> For a spinning wheel-of-fortune effect, I want a "ding" sound to
> repeat at even intervals. And I'd like those intervals to be as short
> as audibly possible without the sound file being too cut-off.
> 
> Using the script below, the "play 'ding'" audibly cycles at an even
> metre a few times, but, after the nth time, there's a very brief but
> clearly perceivable pause or hiccup. When that "nth" time happens
> depends on the wait time of the "send" command, but it's about every
> 6th to 11th cycle.
> 
> I've tried playing with the send time, as well as editing the original
> sound file to be as audibly brief as possible.  In fact, I've been
> attacking this "hiccup" problem on-and-off over the years. One
> "solution" I've tried is to string the dings into a new sound file and
> use a player object to play it. But, at some point, when that spinning
> wheel starts visually slowing down, I just don't see any way of
> getting around the problem that I must rely on a delaying send-in-time
> command to make the wheel also sound like it's slowing down.
> 
> Thank you in advance.  -- Nicolas Cueto
> 
> 
> THE SCRIPT...
> 
> on mouseUp
>    set the cpFlag of me to not the cpFlag of me
>    switch the cpFlag of me
>       case "true"
>          set the label of me to "S T O P"
>          send "dingDing" to me in 0 milliseconds
>          break
>       case "false"
>          set the label of me to "D I N G"
>          break
>    end switch
> end mouseUp
> 
> on dingDing
>    if the cpFlag of me is false then exit dingDing
>    play "ding" -- an au file, length of 0.089 seconds
>    put field "sendWait" into tSendWaittime_ding
>    if tSendWaittime_ding <= 0 then put 90 into tSendWaittime_ding
>    send "dingDing" to me in tSendWaittime_ding milliseconds
> end dingDing
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode






More information about the Use-livecode mailing list