al_create_mixer(3)
π NAME π
al_create_mixer β Allegro 5 API. π
This page is from the Library Functions Manual, and the title is literally al_create_mixer(3), so you already know the vibe.
β¨ SYNOPSIS β¨
#include <allegro5/allegro_audio.h>
ALLEGRO_MIXER *al_create_mixer(unsigned int freq,
ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf)
π DESCRIPTION π
Okay so this function creates a mixer β the little hub where you attach sample instances, audio streams, or other mixers to. π«Ά It will mix into a buffer at the requested frequency (in Hz, bestie) and channel count. Main character audio energy, fr fr.
The only supported audio depths are ALLEGRO_AUDIO_DEPTH_FLOAT32 and ALLEGRO_AUDIO_DEPTH_INT16 β and yes, ALLEGRO_AUDIO_DEPTH_INT16 is not yet complete, so don't forget that part. π
To actually produce any output, the mixer will have to be attached to a voice using al_attach_mixer_to_voice(3). No voice attach, no output β periodt. π₯
Reasonable default arguments are:
al_create_mixer(44100, ALLEGRO_AUDIO_DEPTH_FLOAT32, ALLEGRO_CHANNEL_CONF_2)
Returns true on success, false on error. Simple as that. π
π SEE ALSO π
Cute little sign-off: the footer says Allegro reference manual and is tagged al_create_mixer(3) β no date shown, so we're not inventing one, bestie. πβ¨
π¦ 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