stop_sample(3alleg4)

πŸ’… stop_sample β€” the manual page, bestie edition πŸ’…

okay so you're reading the Allegro manual, and today's main character is stop_sample from stop_sample(3alleg4). it's giving "make it stop" energy and honestly? we love that for us. πŸŽ€


✨ NAME ✨

stop_sample β€” stops a sample from playing. it's part of the Allegro game programming library, no cap. πŸ¦‹


🌸 SYNOPSIS 🌸

#include <allegro.h>

void stop_sample(const SAMPLE *spl);

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea: stop_sample stops a sample from playing. and like, you literally have to do this if you set a sample going in looped mode β€” otherwise it's just gonna keep looping forever and ever and ever, which is lowkey a vibe killer. 😭

and the way that if there are several copies of the sample playing, it will stop all of them. every single one. all the copies. periodt. πŸ‘‘

⚠️ but bestie, listen β€” you must still destroy the sample using destroy_sample(). stopping it is NOT the same as freeing it. don't be out here leaking memory, i'm begging. πŸ’€

🫢 SEE ALSO 🫢


and that's the whole page, angel. 🧚 this was Allegro, version 4.4.3, and it's the stop_sample(3alleg4) page β€” go forth and stop those samples, you absolute icon. πŸ’œβœ¨