al_identify_sample(3)
π NAME π
Okay bestie, welcome to al_identify_sample(3) from the Library Functions Manual β this is the Allegro 5 API, and she's here to help you detect a file's type from its contents β¨π
al_identify_sample β the Allegro 5 API function that tells you what kind of file you're dealing with π
β¨ SYNOPSIS β¨
#include <allegro5/allegro_audio.h>
char const *al_identify_sample(char const *filename)
π¦ DESCRIPTION π¦
So this one works exactly like al_identify_sample_f(3), no cap β except instead of passing a file handle, you pass the filename of the file whose type you want to detect π
And listen: the extension, if there even is one, of the filename you pass in is not taken into account. Not even a little. It's only looking at the file contents, periodt π₯
πΈ SINCE πΈ
5.2.8 β she's been iconic since then πβ¨
π SEE ALSO π
al_init_acodec_addon(3)β go check this bestie too πal_identify_sample_f(3)β the file-handle twin, iykyk π«Άal_register_sample_identifier(3)β another one for your reading list π
Signed, sealed, delivered by the Allegro reference manual β source/version line handled, date not printed on this page, so consider this your timeless little sign-off π
β¨
π¦ 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