audioclips and playstopped

Phil Davis davis.phil at comcast.net
Tue Jun 6 10:02:22 EDT 2006


Hi Richard,

Here's one way:

  play audioclip "xyz"
  wait until the sound is done
  go next cd

Or...

on startAudio
  play audioclip "xyz"
  send "checkAudio" to me in 0 seconds
end startAudio


on checkAudio
  if the sound is done then
    go next cd
  else
    send "checkAudio" to me in 10 ticks
  end if
end checkAudio


Phil Davis


Richard Miller wrote:

> I am having difficulty getting the playstopped message to be recorded  
> on a regular basis while playing audioclips. I've got a stack with a  
> few dozen pages in it. As the user is taken from card to card, a new  
> audio file is played after OPENCARD. Once that audioclip has been  
> played, the system should automatically advance the user to the next  
> card. To do that, I am watching for the PLAYSTOPPED message. But it  
> is not reliable (and I don't know why.. I've not seen any particular  
> pattern. Sometimes it works... sometimes it doesn't).
>
> I need to find another way to automatically advance from card to  
> card. Suggestions?
>
> I thought maybe I could determine the duration of the audioclip  
> before it started to play, then use the SEND command (just before  
> playing the audioclip) to advance to the next card once that duration  
> had been reached, but I see no way to determine the duration of an  
> audioclip (other than hard-coding it).
>
> Richard Miller
> Imprinter Technologies
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list