Game Development Community

Possible to detect sound start and stop through script?

by Steve Howson · in Torque Game Engine · 09/16/2005 (10:24 am) · 1 replies

Hi all!
Is it possible to detect when a sound starts and when it stops through script.
Either that or calculate the duration, before the sound starts, on the fly?

I'm thinking of a goof thing to do after my current project is done and need to have a repeating animation move for the duration of a sound file.

Like have a dance animation run for the duration of a song... that's not exactly what I want to do, but it'd be the same concept.

Thanks for any info.

Just collecting info at this point, probably going to be a month or two until the current project is done.

Steve

#1
09/16/2005 (1:06 pm)
You can use alxIsPlaying(Audiohandle) and make some lovely script of it.
Or maybe alxGetWaveLen(filename) this returns the Lenght in ms.
I dont use them so im out of clues for the script.