-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AudioStreamPlayer3D.get_playback_position()
always returns 0 right after using seek
or play(from_position)
#99699
Comments
I was mislead by this statement. The 2D version would be AudioStreamPlayer2D. AudioStreamPlayer has no position in space and indeed does not have this problem. There are some differences between the 2D and 3D versions in the code which are obvious oversights and are fixed by #99734 (as of writing this), but they do not fix this issue specifically. |
Upon a second look, this is (once again) an issue involving AudioStreamPlayer2D and AudioStreamPlayer3D not playing right away. Rather, they always wait for the next internal frame. On This is actually documented:
But one may consider this a bug, still. |
That is my bad. I should have said "non-spatialized". I have corrected this. |
I was aware of this caveat. However I was under the impression that although no action is taken until the next frame (as in the audio itself does not immediately change), the values reported would still accurately reflect the desired, imminent state. But ultimately, it is the inconsistency between |
Tested versions
Reproducible in 4.3.stable and 4.4.dev5
System information
Godot v4.4.dev5 - Windows 10.0.22631 - Multi-window, 1 monitor - OpenGL 3 (Compatibility) - NVIDIA GeForce GTX 1660 SUPER (NVIDIA; 32.0.15.6603) - Intel(R) Core(TM) i7-10700F CPU @ 2.90GHz (16 threads)
Issue description
AudioStreamPlayer3D.get_playback_position()
returns 0 right after usingseek(...)
orplay(...)
with a non-zero argument. The actual seek operation works, andget_playback_position
will eventually return the correct time, but the expected behaviour is for it to report the correct number immediately.The non-spatialized version of this node,
AudioStreamPlayer
, does not have the same issue (get_playback_position
always returns the correct value).Steps to reproduce
Seek
button.Minimal reproduction project (MRP)
bug-report.zip
The text was updated successfully, but these errors were encountered: