0 votes

I want to create timeline (for something like a musicplayer). Is there any intelligent way to get length of an audio stream? I tried:

var length = $AudioStreamPlayer.get_length()
print (length)

but no success...

in Engine by (95 points)

1 Answer

+2 votes
Best answer

https://docs.godotengine.org/en/stable/classes/class_audiostream.html#class-audiostream-method-get-length

ya get_length but on the sample (AudioStreamSample base class AudioStream) not player

$AudioStreamPlayer.stream.get_length()

i think :)

by (1,665 points)
selected by

You saved my life...! :D

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.