al_set_sam...stance_pan(3)
π§ al_set_sample_instance_pan β Allegro 5 API π§
okay bestie, welcome to the Library Functions Manual corner of the Allegro universe β¨ this page is all about setting the pan value on a sample instance, and itβs lowkey a whole vibe π¦
πΈ NAME πΈ
al_set_sample_instance_pan β Allegro 5 API π
β¨ SYNOPSIS β¨
#include <allegro5/allegro_audio.h>
bool al_set_sample_instance_pan(ALLEGRO_SAMPLE_INSTANCE *spl, float val)
π DESCRIPTION π
So youβre setting the pan value on a sample instance. Hereβs the vibe check on the numbers, bestie:
-1.0β play the sample only through the left speaker π«Ά+1.0β play it only through the right speaker π0.0β the sample is centre balanced βοΈ
Thereβs also the special value ALLEGRO_AUDIO_PAN_NONE(3), which disables panning and plays the sample at its original level. Heads up: that will be louder than a pan value of 0.0 π₯
Note: panning samples with more than two channels doesnβt work yet π
It returns true on success and false on failure. It will fail if the sample instance is attached directly to a voice π
π¦ SEE ALSO π¦
π cute sign-off time: source/version is the Allegro reference manual, page al_set_sam...stance_pan(3) β and thereβs no date in this footer, so no cap, Iβm not making one up π periodt π
π¦ 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