-
-
Notifications
You must be signed in to change notification settings - Fork 33
Description
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
- Addon version: 2.6.1
- Godot version: 4.2.2
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.
