clamp pan value between -1.0 and 1.0

pull/1/head
cosmonaut 2021-11-02 01:56:18 -07:00
parent 609edc4e10
commit c9614cd386
1 changed files with 1 additions and 0 deletions

View File

@ -577,6 +577,7 @@ double FAudioGMS_StaticSound_LoadWAV(char *filePath)
static void FAudioGMS_INTERNAL_SoundInstance_SetPan(FAudioGMS_SoundInstance* instance, float pan) static void FAudioGMS_INTERNAL_SoundInstance_SetPan(FAudioGMS_SoundInstance* instance, float pan)
{ {
pan = SDL_max(-1.0, SDL_min(1.0, pan));
instance->pan = pan; instance->pan = pan;
SetPanMatrixCoefficients(instance); SetPanMatrixCoefficients(instance);