ALLEGRO_AUDIO_PAN_NONE(3alleg5)
π NAME π
ALLEGRO_AUDIO_PAN_NONE β the Allegro 5 API's lil magic number that says "bestie, do NOT pan this one" π (it lives in the 3alleg5 manual, iykyk)
β¨ SYNOPSIS β¨
#include <allegro5/allegro_audio.h>
#define ALLEGRO_AUDIO_PAN_NONE (-1000.0f)
πΈ DESCRIPTION πΈ
okay so listen. ALLEGRO_AUDIO_PAN_NONE is a special value for the pan property of sample instances and audio streams. You drop this value in when you want to disable panning on a sample instance or an audio stream, and it'll play them with no attenuation β none of that volume-dipping that the panning support would otherwise imply. no cap. π«Ά
and here's the tea, bestie, because this is the part that trips people up: ALLEGRO_AUDIO_PAN_NONE is NOT the same as a pan value of 0.0 (which is centered). Why? Because when panning is enabled, Allegro tries to maintain a constant sound power level as a sample gets panned from left to right. The whole vibe is: a sound coming out of one speaker should sound exactly as loud as it does when it's split over two speakers. π
and the consequence of that? a sample with a pan value of 0.0 will be 3 dB softer than the original level. yes, literally. that's the price of physics being physics. π
(Please correct us if this is wrong.) β direct quote from the Allegro devs, and honestly? icon behaviour. they said "we're pretty sure but yell at us if not" and that's main character energy fr fr. π
that's the whole page, babe β short, sweet, and absolutely essential if you've ever wondered why your centered sound is mysteriously quieter than your unpanned one. π
signing off with love from the Allegro reference manual π and remember the name on the door: ALLEGRO_AUDIO_PAN_NONE(3alleg5) β slay, go forth, and pan responsibly ππ¦
π¦ 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