diff --git a/src/FAudioGMS.c b/src/FAudioGMS.c index b1ff286..9bbd60c 100644 --- a/src/FAudioGMS.c +++ b/src/FAudioGMS.c @@ -577,6 +577,7 @@ double FAudioGMS_StaticSound_LoadWAV(char *filePath) static void FAudioGMS_INTERNAL_SoundInstance_SetPan(FAudioGMS_SoundInstance* instance, float pan) { + pan = SDL_max(-1.0, SDL_min(1.0, pan)); instance->pan = pan; SetPanMatrixCoefficients(instance);