04-20-2024, 12:38 PM
(04-19-2024, 10:21 PM)Delsus Wrote: Thank you for your insight!
For some reason I thought I didn't need to free the memory like for images.
It's an easy fix and I will get to it to prevent memory leaks
You can also use _SNDPLAYFILE which automatically loads, plays and then closes the sound for you. This is usually ok. However, if I were to play some sounds often (say an explosion sound in a shooter game), then I'd rather pre-load the sound and keep the sound handle throughout the lifetime of the program. This is purely for performance reasons.