al_destroy_sample(3)
π al_destroy_sample(3) π
okay bestie, straight from the Library Functions Manual, we're talking al_destroy_sample(3) β it's giving cleanup era, and honestly? iconic π«Ά
πΈ NAME πΈ
al_destroy_sample β Allegro 5 API. That's the whole name, no cap β¨
β¨ SYNOPSIS β¨
#include <allegro5/allegro_audio.h>
void al_destroy_sample(ALLEGRO_SAMPLE *spl)
π DESCRIPTION π
So basically: it frees the sample data structure π
If it was created with the free_buf parameter set to true, then the buffer will be freed with al_free(3) β yes, that exact function, bestie.
And listen: this function will stop any sample instances which may be playing the buffer referenced by the ALLEGRO_SAMPLE(3). So it's not just deleting the struct and leaving ghost audio on main π it stops those instances too. periodt.
π SEE ALSO π
go read these next if you're in your audio-cleanup arc π¦
mwah π β this page came from the Allegro reference manual, and the footer didn't give us a date, so that's the whole timestamp situation π
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms