Hey there,
is there a portable way in spring to get the time duration of an audio file ? I'm doing some "climax" sound widget, and I get very upset hardcoding the timings :p
Get sound time
Moderator: Moderators
Get sound time
Last edited by otyugh on 13 Aug 2015, 15:30, edited 1 time in total.
Re: Sound and spring
Spring.GetSoundStreamTime() could workotyugh wrote:Hey there,
is there a portable way in spring to get the time duration of an audio file ? I'm doing some "climax" sound widget, and I get very upset hardcoding the timings :p
Re: Sound and spring
Sounds neat indeed. Dunno how I did not see it.
Seems that it only repport the time the sound was played and not its duration.
( ) -> number playedTime, number totalTime
I get number playedTime, but how to get the second one ?
Seems that it only repport the time the sound was played and not its duration.
( ) -> number playedTime, number totalTime
I get number playedTime, but how to get the second one ?
Re: Sound and spring
local playedTime, totalTime = Spring.GetSoundStreamTime()
Re: Sound and spring
This is what I was looking for. Thx.