mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Resampler: Fix a bug where the LPF is not being applied.
This commit is contained in:
+4
-4
@@ -59254,7 +59254,7 @@ static ma_result ma_linear_resampler_process_pcm_frames_s16_downsample(ma_linear
|
||||
}
|
||||
|
||||
/* Filter. Do not apply filtering if sample rates are the same or else you'll get dangerous glitching. */
|
||||
if (pResampler->inAdvanceInt == 1 && pResampler->inAdvanceFrac == 0) {
|
||||
if (pResampler->inAdvanceInt != 1 || pResampler->inAdvanceFrac != 0) {
|
||||
ma_lpf_process_pcm_frame_s16(&pResampler->lpf, pResampler->x1.s16, pResampler->x1.s16);
|
||||
}
|
||||
|
||||
@@ -59345,7 +59345,7 @@ static ma_result ma_linear_resampler_process_pcm_frames_s16_upsample(ma_linear_r
|
||||
ma_linear_resampler_interpolate_frame_s16(pResampler, invSampleRateOut, pFramesOutS16);
|
||||
|
||||
/* Filter. Do not apply filtering if sample rates are the same or else you'll get dangerous glitching. */
|
||||
if (pResampler->inAdvanceInt == 1 && pResampler->inAdvanceFrac == 0) {
|
||||
if (pResampler->inAdvanceInt != 1 || pResampler->inAdvanceFrac != 0) {
|
||||
ma_lpf_process_pcm_frame_s16(&pResampler->lpf, pFramesOutS16, pFramesOutS16);
|
||||
}
|
||||
|
||||
@@ -59422,7 +59422,7 @@ static ma_result ma_linear_resampler_process_pcm_frames_f32_downsample(ma_linear
|
||||
}
|
||||
|
||||
/* Filter. Do not apply filtering if sample rates are the same or else you'll get dangerous glitching. */
|
||||
if (pResampler->inAdvanceInt == 1 && pResampler->inAdvanceFrac == 0) {
|
||||
if (pResampler->inAdvanceInt != 1 || pResampler->inAdvanceFrac != 0) {
|
||||
ma_lpf_process_pcm_frame_f32(&pResampler->lpf, pResampler->x1.f32, pResampler->x1.f32);
|
||||
}
|
||||
|
||||
@@ -59513,7 +59513,7 @@ static ma_result ma_linear_resampler_process_pcm_frames_f32_upsample(ma_linear_r
|
||||
ma_linear_resampler_interpolate_frame_f32(pResampler, invSampleRateOut, pFramesOutF32);
|
||||
|
||||
/* Filter. Do not apply filtering if sample rates are the same or else you'll get dangerous glitching. */
|
||||
if (pResampler->inAdvanceInt == 1 && pResampler->inAdvanceFrac == 0) {
|
||||
if (pResampler->inAdvanceInt != 1 || pResampler->inAdvanceFrac != 0) {
|
||||
ma_lpf_process_pcm_frame_f32(&pResampler->lpf, pFramesOutF32, pFramesOutF32);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user