al_register_a..._stream_loader(3alleg5)
al_register_audio_stream_loader π
okay bestie, welcome to the Allegro 5 API manual, we're doing this β¨
β¨ NAME β¨
al_register_audio_stream_loader β the Allegro 5 API girlie who handles your audio stream loaders π
π¦ SYNOPSIS π¦
#include <allegro5/allegro_audio.h>
bool al_register_audio_stream_loader(const char *ext,
ALLEGRO_AUDIO_STREAM *(*stream_loader)(const char *filename,
size_t buffer_count, unsigned int samples))
π DESCRIPTION π
so basically, this function registers a handler for al_load_audio_stream(3alleg5) and al_play_audio_stream(3alleg5). the function you hand over is the one that's gonna get used to open streams from files with the extension you specify. no cap. π«Ά
now, about that extension β it should include the leading dot (.) character. yes, the dot. don't skip the dot. and it gets matched case-insensitively, so like, ".ogg" and ".OGG" are the same vibe, okurrr? π
the stream_loader argument? you can pass NULL to unregister an entry. iconic. bye bye loader. π
as for what it returns:
- it returns
trueon success β¨ - it returns
falseon error π - and it also returns
falseif you're trying to unregister an entry that doesn't even exist β like, girl, there's nothing to unregister. false. periodt.
ngl, if you're getting false back, double-check whether you're registering or unregistering, and whether that entry was ever there in the first place. π
π SEE ALSO π
that's the whole page bestie, you ate π this was the Allegro reference manual, same title as always β al_register_a..._stream_loader(3alleg5) β so go forth and register those loaders, mwah πβ¨π¦
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms