al_destroy_sample(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’– 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