Wait until the sound is done
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 84
- Joined: Mon Apr 06, 2020 1:19 pm
- Contact:
Wait until the sound is done
Hello:
The code in the subject line is not working for me on OSX Monterey using the livecode audio player object.
Is it me? Is it Monterey? Is it Livecode? I feel like a seagull covered in oil and am wondering if there is a way back to the skies. I've seen nothing on line to tell me what's up or what to do and thus I turn to the learned, the experienced and the helpful.
Bruce
The code in the subject line is not working for me on OSX Monterey using the livecode audio player object.
Is it me? Is it Monterey? Is it Livecode? I feel like a seagull covered in oil and am wondering if there is a way back to the skies. I've seen nothing on line to tell me what's up or what to do and thus I turn to the learned, the experienced and the helpful.
Bruce
Re: Wait until the sound is done
Hi Bruce,
this will only work if you started your sound with -> play audioclip "the_sound.xxx"
It does not work with the player object.
Best
Klaus
this will only work if you started your sound with -> play audioclip "the_sound.xxx"
It does not work with the player object.
Best
Klaus
Re: Wait until the sound is done
Hi Bruce,
What Klaus said
Works also with sound file.
Best
Jean-Marc
What Klaus said
Works also with sound file.
Best
Jean-Marc
https://alternatic.ch
-
- Posts: 84
- Joined: Mon Apr 06, 2020 1:19 pm
- Contact:
Re: Wait until the sound is done
Klaus:
If my life were a hotdog - you would be the mustard relish that makes it all worthwhile. Thank you.
I thought that play had been deprecated and we were meant to use the player object these days?
Should I have been able to find this out for myself or is it just experience on your part?
Bruce
If my life were a hotdog - you would be the mustard relish that makes it all worthwhile. Thank you.
I thought that play had been deprecated and we were meant to use the player object these days?
Should I have been able to find this out for myself or is it just experience on your part?
Bruce
Re: Wait until the sound is done
Hi Bruce,

You're welcome!
Best
Klaus
LOLbbalmerTotalFluency wrote: ↑Tue Jan 11, 2022 1:29 pmKlaus:
If my life were a hotdog - you would be the mustard relish that makes it all worthwhile. Thank you.

You're welcome!
No, PLAY AC is still supported. But since this only supports a very limited fileformats (UNCOMPRESSED wav and aiff files and the compressed-by-nature AU format, it may be seldom used.bbalmerTotalFluency wrote: ↑Tue Jan 11, 2022 1:29 pmI thought that play had been deprecated and we were meant to use the player object these days?
Well, the dictionary does not explicitely mention this anywhere, so "thou shalt be forgiven" for not finding it!bbalmerTotalFluency wrote: ↑Tue Jan 11, 2022 1:29 pmShould I have been able to find this out for myself or is it just experience on your part?

Best
Klaus
Re: Wait until the sound is done
If you want to know when the player is finished you can handle the playStopped message.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Wait until the sound is done
Exactly!

And if you need to knwo if the sound really finished you can:
Code: Select all
...
put the duration of player "your sound here" into tDur
put the currenttime of player "your sound here" into tCur
if tDur = tCur then
## sound is really "done"
## do your thing...
end if
...