Page 1 of 1

Need urgent help! How to play audioClip ".wav" from a certain time?

Posted: Mon Oct 10, 2022 10:59 pm
by royF
How to play audioClip ".wav" from a certain time?

For example, I want to play the music from minute 01:20?

Thanks!!

Re: Need urgent help! How to play audioClip ".wav" from a certain time?

Posted: Tue Oct 11, 2022 9:10 am
by Klaus
Hi royF,

welcome to the forum!

You will need to use a PLAYER object for this, the "play audioclip xxx" command does not support this.
1. Set the filename of the player object to your WAV file.
2. Then if you want to start the sound you need to forward to 1:20, maybe in a button or when- and wherever you start the sound:

Code: Select all

...
## timescale = units per seconds in movie or sound:
put the timescale of player "your wav sound here" into tTScale
## Forward 80 seconds:
put round(80 * tTScale) into tCurrentTime
set the currenttime of player "your wav sound here" to tCurrentTime
start player "your wav sound here"
...
Best

Klaus

P.S.
Personal note: A little "Hello" would not have hurt for the very first posting.

Re: Need urgent help! How to play audioClip ".wav" from a certain time?

Posted: Wed Oct 12, 2022 11:48 am
by royF
Thanks You!!! :D