diff options
Diffstat (limited to 'src/mixer.c')
-rw-r--r-- | src/mixer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mixer.c b/src/mixer.c index 0f3b5b1..3b49ba2 100644 --- a/src/mixer.c +++ b/src/mixer.c @@ -191,6 +191,8 @@ xas_audio_stream *xas_mixer_output(xas_mixer *mixer) { } static inline void input_set_pan(xas_mixer_input *input, float pan) { + static float range = 45.0f * (M_PI / 180.0); + float angle, term, cosf_angle, @@ -200,7 +202,7 @@ static inline void input_set_pan(xas_mixer_input *input, float pan) { return; } - angle = pan * (M_PI / 2.0f); + angle = pan * range; term = sqrtf(2.0f) / 2.0f; cosf_angle = cosf(angle); sinf_angle = sinf(angle); |