ALLEGRO_MIXER(3)

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

πŸ’– ALLEGRO_MIXER πŸ’–

okay bestie, welcome to the Allegro 5 API corner of the Allegro reference manual β€” this one's all about the mixer, and it's honestly kind of the main character of your audio setup πŸŽ€


✨ NAME ✨

ALLEGRO_MIXER β€” the Allegro 5 API's very own mixer, no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro5/allegro_audio.h>

typedef struct ALLEGRO_MIXER ALLEGRO_MIXER;

🌸 DESCRIPTION 🌸

So like, a mixer mixes together all the streams you've attached to it into a single buffer. That's the whole vibe. 🫢

And the way that it's doing all this while it goes β€” it converts the channel configurations, sample frequencies and audio depths of the attached sample instances and audio streams accordingly. Like it just handles it, periodt. ✨

You can control the quality of this conversion using ALLEGRO_MIXER_QUALITY β€” iykyk, go tweak that if you care about the conversion being extra crispy πŸ”Š

Now for the deets on the volume math, because this part is important and lowkey iconic:

  • When going from mono to stereo (and above), the mixer reduces the volume of both channels by sqrt(2). πŸ™ˆ
  • When going from stereo (and above) to mono, the mixer reduces the volume of the left and right channels by sqrt(2) before adding them to the center channel (if present). πŸ’€
fr fr, don't sleep on those sqrt(2) numbers β€” they're literally in there, bestie, and they're doing real work 🧚

okay that's the whole page, you ate that πŸ’œ this little love letter came to you straight from the Allegro reference manual, repping ALLEGRO_MIXER(3) β€” mwah, go make something sound gorgeous 🌈⭐

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