From b3340e629a489dda6c9570e4148c09fa5d55f828 Mon Sep 17 00:00:00 2001 From: David Reid Date: Fri, 13 Feb 2026 20:54:38 +1000 Subject: [PATCH] Remove a TODO. I tried addressing this, but upon doing so the build was slower. It was especially bad with Clang where is was 2x slower(!), and just slightly slower with GCC. Not sure exactly what's going on here, but I guess the compiler is hitting some edge case that's prevent efficient optimization. What's weirder, is the slowness only affects the mono s16 code path. Other code paths are totally fine. --- miniaudio.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/miniaudio.h b/miniaudio.h index 237a4a9a..082fc11a 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -59939,7 +59939,7 @@ static MA_INLINE void ma_linear_resampler_filter_s16(ma_linear_resampler* pResam { ma_int32* pLPF; ma_uint32 iLPF; - ma_uint32 lpfCount = pResampler->lpfOrder >> 1; /* TODO: It's actually more useful to store lpfCount instead of lpfOrder. */ + ma_uint32 lpfCount = pResampler->lpfOrder >> 1; ma_uint32 iChannel; pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_S32(pResampler, 0); @@ -59993,7 +59993,7 @@ static MA_INLINE void ma_linear_resampler_filter_s32(ma_linear_resampler* pResam { ma_int32* pLPF; ma_uint32 iLPF; - ma_uint32 lpfCount = pResampler->lpfOrder >> 1; /* TODO: It's actually more useful to store lpfCount instead of lpfOrder. */ + ma_uint32 lpfCount = pResampler->lpfOrder >> 1; ma_uint32 iChannel; pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_S32(pResampler, 0); @@ -60029,7 +60029,7 @@ static MA_INLINE void ma_linear_resampler_filter_s32_mono(ma_linear_resampler* p { ma_int32* pLPF; ma_uint32 iLPF; - ma_uint32 lpfCount = pResampler->lpfOrder >> 1; /* TODO: It's actually more useful to store lpfCount instead of lpfOrder. */ + ma_uint32 lpfCount = pResampler->lpfOrder >> 1; ma_uint32 iChannel; pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_S32(pResampler, 0); @@ -60065,7 +60065,7 @@ static MA_INLINE void ma_linear_resampler_filter_s32_stereo(ma_linear_resampler* { ma_int32* pLPF; ma_uint32 iLPF; - ma_uint32 lpfCount = pResampler->lpfOrder >> 1; /* TODO: It's actually more useful to store lpfCount instead of lpfOrder. */ + ma_uint32 lpfCount = pResampler->lpfOrder >> 1; ma_uint32 iChannel; pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_S32(pResampler, 0); @@ -60125,7 +60125,7 @@ static MA_INLINE void ma_linear_resampler_filter_f32(ma_linear_resampler* pResam { float* pLPF; ma_uint32 iLPF; - ma_uint32 lpfCount = pResampler->lpfOrder >> 1; /* TODO: It's actually more useful to store lpfCount instead of lpfOrder. */ + ma_uint32 lpfCount = pResampler->lpfOrder >> 1; ma_uint32 iChannel; pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_F32(pResampler, 0); @@ -60161,7 +60161,7 @@ static MA_INLINE void ma_linear_resampler_filter_f32_mono(ma_linear_resampler* p { float* pLPF; ma_uint32 iLPF; - ma_uint32 lpfCount = pResampler->lpfOrder >> 1; /* TODO: It's actually more useful to store lpfCount instead of lpfOrder. */ + ma_uint32 lpfCount = pResampler->lpfOrder >> 1; ma_uint32 iChannel; pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_F32(pResampler, 0); @@ -60197,7 +60197,7 @@ static MA_INLINE void ma_linear_resampler_filter_f32_stereo(ma_linear_resampler* { float* pLPF; ma_uint32 iLPF; - ma_uint32 lpfCount = pResampler->lpfOrder >> 1; /* TODO: It's actually more useful to store lpfCount instead of lpfOrder. */ + ma_uint32 lpfCount = pResampler->lpfOrder >> 1; ma_uint32 iChannel; pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_F32(pResampler, 0);