AL_REGISTER_SAMPLE_LOADER_F(3)

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

πŸ’– NAME πŸ’–

al_register_sample_loader_f β€” Allegro 5 API, bestie! This page is from the Library Functions Manual, and yes, the vibe is immaculate ✨

✨ SYNOPSIS ✨

#include <allegro5/allegro_audio.h>

bool al_register_sample_loader_f(const char *ext,
   ALLEGRO_SAMPLE *(*loader)(ALLEGRO_FILE* fp))

πŸŽ€ DESCRIPTION πŸŽ€

Okay so picture this: you're registering a handler for al_load_sample_f(3). The function you hand over gets used to handle loading sample files with the extension you specify. Iconic behavior, honestly πŸ’…

The extension should include the leading dot (.) character. It will be matched case-insensitively. Yes, case-insensitively β€” she's flexible like that πŸ¦‹

The loader argument may be NULL to unregister an entry.

Returns true on success, false on error. It also returns false if you're unregistering an entry that doesn't exist β€” not me getting rejected by the registry πŸ˜­πŸ’€

πŸ‘€ SEE ALSO πŸ‘€


Cute sign-off: this page is sourced from the Allegro reference manual; the footer didn't give a date, so I'm not inventing one β€” periodt πŸ’–βœ¨

πŸ“¦ 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