1al_set_sample_instance_pan(3L)ibrary Functions Manuaall_set_sample_instance_pan(3)
2
3
4

NAME

6       al_set_sample_instance_pan
7

SYNOPSIS

9              #include <allegro5/allegro_audio.h>
10
11              bool al_set_sample_instance_pan(ALLEGRO_SAMPLE_INSTANCE *spl, float val)
12

DESCRIPTION

14       Set  the pan value on a sample instance.  A value of –1.0 means to play
15       the sample only through the left speaker; +1.0 means only  through  the
16       right speaker; 0.0 means the sample is centre balanced.
17
18       A constant sound power level is maintained as the sample is panned from
19       left to right.  As a consequence, a pan value of 0.0 will play the sam‐
20       ple 3 dB softer than the original level.  To disable panning and play a
21       sample  at  its  original  level,  set   the   pan   value   to   ALLE‐
22       GRO_AUDIO_PAN_NONE(3).
23
24       Returns  true  on  success,  false on failure.  Will fail if the sample
25       instance is attached directly to a voice.
26
27       (A sound guy should explain that better; I only implemented  it.   Also
28       this might be more properly called a balance control than pan.  Also we
29       don't attempt anything with more than two channels yet.)
30

SEE ALSO

32       al_get_sample_instance_pan(3).
33
34
35
36Allegro reference manual                         al_set_sample_instance_pan(3)
Impressum