When using AudioStreamInteractive, AudioStreamPlayer.get_playback_position() always returns 0.

Godot Version

Godot 4.3 & 4.4-dev
windows 11 pro

Question

When I assign AudioStreamOggVorbis directly to AudioStreamPlayer.stream, AudioStreamPlayer.get_playback_position() works correctly.

However, when I use AudioStreamInteractive, AudioStreamPlayer.get_playback_position() returns 0.

Is this the intended behavior?

1 Like

I’ve noticed this too and it’s really unfortunate. It’s almost certainly a bug. I’d like to report the bug on GitHub when I get the chance but feel free to do it first!

As a workaround, I calculate the song runtime using Time.get_ticks_usec to get how much real time has elapsed. But it’s really not stable and I don’t recommend it!

1 Like

Thank you for the advice. It doesn’t seem to be an issue with my development environment, which is unfortunate.

Is anyone else experiencing the same issue?
If so, I will mark this question as a ‘bug’ and consider it resolved

1 Like

I wrote a bug report on the GitHub and KingTheFifth has already written a fix for it!

Amazing!!!

1 Like

Thank you! I’m looking forward to seeing it implemented!

1 Like