-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Using an AudioStreamRandomizer with play_sound will error on the third attempt. #31
Comments
Bug confirmed |
Removing get_player_with_resource() for AudioStreamRandomizer solves the problem, but maybe with another side effect I did not find |
Hi! Did you get it why AudioStreamRandomizer was being handled differently? Because i face the same problem and don't find any other solution but commenting 39 and 40 lines. Did you face any problems after commenting these lines? |
Hey! No unfortunatley I never figured it out. |
Haha, that's nice Thank you for your reply! |
Describe the bug
When playing a sound with SoundManager.play_sound() using an AudioStreamRandomizer as the audiostream resource the addon will error on the third use of play_sound() at sound_manager/abstract_audio_player_pool.gd on line 62 due to a missing/null player stream.
Commenting out lines 39 and 40 fixes the issue as it plays the AudioStreamRandomizer as a normal AudioStream without going into get_player_with_resource() (I'm a bit confused as to why AudioStreamRandomizer is being handled differently with this method).
The cause of the missing/null player stream is happening on line 79 in mark_player_as_available(), that's where the player gets destroyed with a queue_free().
Affected version
To Reproduce
Play a sound with SoundManager.play_sound() using an AudioStreamRandomizer as the AudioStream resource and play the sound 3 or more times, should trigger the error.
Screenshots

The text was updated successfully, but these errors were encountered: