ALLEGRO_AUDIO_DEPTH(3alleg5)
π ALLEGRO_AUDIO_DEPTH π
okay bestie, welcome to the Allegro 5 API corner of the manual, this one's ALLEGRO_AUDIO_DEPTH(3alleg5) and it's literally all about how your audio samples are shaped. sit down, hydrate, let's go π
β¨ SYNOPSIS β¨
#include <allegro5/allegro_audio.h>
enum ALLEGRO_AUDIO_DEPTH
πΈ DESCRIPTION πΈ
so this enum is giving sample depth, sample type, and also signedness β like, all three at once, main character energy fr fr. π
the tea on mixers: they only mess with 32-bit signed float (that's the -1..+1 range, cutie) or 16-bit signed integers. that's it. that's the whole vibe. π«Ά
and the signedness situation? it's not a separate enum, no no. it's an βunsignedβ bit-flag that gets applied on top of the depth value. sneaky but iconic. β¨
here's the whole lineup of depth values:
ALLEGRO_AUDIO_DEPTH_INT8ALLEGRO_AUDIO_DEPTH_INT16ALLEGRO_AUDIO_DEPTH_INT24ALLEGRO_AUDIO_DEPTH_FLOAT32ALLEGRO_AUDIO_DEPTH_UNSIGNED
and because the Allegro girlies are thoughtful like that, for convenience you also get the unsigned ones pre-combined, no bit-math required:
ALLEGRO_AUDIO_DEPTH_UINT8ALLEGRO_AUDIO_DEPTH_UINT16ALLEGRO_AUDIO_DEPTH_UINT24
lowkey important: that ALLEGRO_AUDIO_DEPTH_UNSIGNED is a flag you OR onto a depth, it's not a depth on its own. iykyk. π§
okay that's the whole page, you ate it, you understood it, periodt. π
this was served fresh from the Allegro reference manual, page ALLEGRO_AUDIO_DEPTH(3alleg5) β mwah, go make some sounds bestie πππ¦πΈπ
π¦ 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