Post
by jacque » Sun Jan 10, 2021 9:50 pm
Your best bet is to use a player control and sound files on disk. The player can be invisible if you don't want it to show. This lets you start the player at any location in the file, which will allow you to skip the silence at the beginning. You'll probably also want to skip any silence at the end, which you can do if you query the currentTime of the player and stop playback as needed, but it's much easier to just edit the file to eliminate the silences.
Once the files are cleaned up, use the method I described to seamlessly play back all the files. Without the prepare command, there will always be a delay between audio segments because LC has to load the entire content into memory before it can be played back. The prepare command was implemented to solve this problem.
The message that is sent when playback ends is "playStopped". Write a playStopped handler that immediately starts the next file and also prepares the following one so it's ready to go. That's as close as you'll get for continuous playback.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com