From 4d5433ae5884f66af51a3849929d8d4a719f422d Mon Sep 17 00:00:00 2001 From: David Reid Date: Mon, 1 Jun 2020 20:38:37 +1000 Subject: [PATCH] Use first order LPF for pitch shifting by default. There is a bug that's causing glitches which appears to be something to do with the second order LPF. --- research/ma_engine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/research/ma_engine.h b/research/ma_engine.h index d838956b..3e808437 100644 --- a/research/ma_engine.h +++ b/research/ma_engine.h @@ -1504,7 +1504,7 @@ static ma_result ma_engine_effect_init(ma_engine* pEngine, ma_engine_effect* pEf */ converterConfig.resampling.allowDynamicSampleRate = MA_TRUE; /* This makes sure a resampler is always initialized. TODO: Need a flag that specifies that no pitch shifting is required for this sound so we can avoid the cost of the resampler. Even when the pitch is 1, samples still run through the resampler. */ converterConfig.resampling.algorithm = ma_resample_algorithm_linear; - converterConfig.resampling.linear.lpfOrder = 2; + converterConfig.resampling.linear.lpfOrder = 1; result = ma_data_converter_init(&converterConfig, &pEffect->converter); if (result != MA_SUCCESS) {