No sound in the game

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By saraalipour

Hello everyone…
Does anyone know why the sound does not play in this code?

Because you have 21 errors in debuger?

Moreus | 2023-04-04 10:17

:bust_in_silhouette: Reply From: Joel Gomes da Silva

I’m pretty sure it’s because you called queue_free() and the audio stream player gets freed as well, so no sound will be played. Maybe a singleton dedicated to play sounds or delaying the queue_free() until the sound finished playing may fix this.

Yeah, that’s right, thank you.

saraalipour | 2023-04-14 16:59