clamp filter frequency params
parent
6ff2682149
commit
2568e9869b
|
@ -539,7 +539,7 @@ static void FAudioGMS_INTERNAL_SoundInstance_SetLowPassFilter(FAudioGMS_SoundIns
|
|||
{
|
||||
FAudioFilterParameters p;
|
||||
p.Type = FAudioLowPassFilter;
|
||||
p.Frequency = lowPassFilter;
|
||||
p.Frequency = SDL_max(0.0, SDL_min(1.0, lowPassFilter));
|
||||
p.OneOverQ = 1.0f / Q;
|
||||
|
||||
FAudioVoice_SetFilterParameters(instance->handle, &p, 0);
|
||||
|
@ -561,7 +561,7 @@ static void FAudioGMS_INTERNAL_SoundInstance_SetHighPassFilter(FAudioGMS_SoundIn
|
|||
{
|
||||
FAudioFilterParameters p;
|
||||
p.Type = FAudioHighPassFilter;
|
||||
p.Frequency = highPassFilter;
|
||||
p.Frequency = SDL_max(0.0, SDL_min(1.0, highPassFilter));
|
||||
p.OneOverQ = 1.0f / Q;
|
||||
|
||||
FAudioVoice_SetFilterParameters(instance->handle, &p, 0);
|
||||
|
@ -583,7 +583,7 @@ static void FAudioGMS_INTERNAL_SoundInstance_SetBandPassFilter(FAudioGMS_SoundIn
|
|||
{
|
||||
FAudioFilterParameters p;
|
||||
p.Type = FAudioBandPassFilter;
|
||||
p.Frequency = bandPassFilter;
|
||||
p.Frequency = SDL_max(0.0, SDL_min(1.0, bandPassFilter));
|
||||
p.OneOverQ = 1.0f / Q;
|
||||
|
||||
FAudioVoice_SetFilterParameters(instance->handle, &p, 0);
|
||||
|
|
Loading…
Reference in New Issue