Audioemitter wav file length
by Luis Anton · in Torque Game Engine · 01/24/2005 (4:09 am) · 2 replies
Hi!
How could I know the exact duration (say in milliseconds) of an audio file (in game)? I create an audioEmitter when I play certain wavs, and I need to wait until they stop. I'm currently doing it manually, using Audacity to get the total lenght... I did something similar in Java some time ago, and knowing the length of a wav file was pretty useful.
Thanks.
How could I know the exact duration (say in milliseconds) of an audio file (in game)? I create an audioEmitter when I play certain wavs, and I need to wait until they stop. I'm currently doing it manually, using Audacity to get the total lenght... I did something similar in Java some time ago, and knowing the length of a wav file was pretty useful.
Thanks.
#2
But thanks for posting the solution.
Could be useful anyway !!
01/27/2005 (3:03 am)
I think none use this kind of code thats why you didnt get an answer.But thanks for posting the solution.
Could be useful anyway !!
Torque Owner Luis Anton
May be I shouldn't post the answer... was it too obvious to be answered or no one knew? ;)
bah, anyway:
%waitfor = alxGetWaveLen(%file);
and you get the wave file length in milliseconds. Pretty useful for me, lot of developing time saved!