diff --git a/miniaudio.h b/miniaudio.h index aa14a5e4..7e09f08d 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -59280,47 +59280,6 @@ static MA_INLINE ma_int16 ma_linear_resampler_mix_s16(ma_int16 x, ma_int16 y, ma return (ma_int16)(x + (n >> MA_LINEAR_RESAMPLER_LERP_SHIFT)); } -static MA_INLINE void ma_linear_resampler_interpolate_frame_s16(ma_linear_resampler* pResampler, ma_uint32 invSampleRateOut, ma_int16* MA_RESTRICT pFrameOut) -{ - ma_uint32 c; - ma_uint32 a; - const ma_uint32 channels = pResampler->channels; - - MA_ASSERT(pResampler != NULL); - MA_ASSERT(pFrameOut != NULL); - - /* - The fractional component (inTimeFrac) will be between 0 and the output sample rate. We need to apply a scaling - factor (invSampleRateOut). It is assumed invSampleRateOut has been shifted by MA_LINEAR_RESAMPLER_LERP_SHIFT. - - The lerp below is based on the ma_mix_f32_fast(), but with fixed point math. - */ - a = pResampler->inTimeFrac * invSampleRateOut; - - MA_ASSUME(channels > 0); - for (c = 0; c < channels; c += 1) { - pFrameOut[c] = ma_linear_resampler_mix_s16(pResampler->x0.s16[c], pResampler->x1.s16[c], a); - } -} - -static MA_INLINE void ma_linear_resampler_interpolate_frame_f32(ma_linear_resampler* pResampler, float invSampleRateOut, float* MA_RESTRICT pFrameOut) -{ - ma_uint32 c; - float a; - const ma_uint32 channels = pResampler->channels; - - MA_ASSERT(pResampler != NULL); - MA_ASSERT(pFrameOut != NULL); - - a = pResampler->inTimeFrac * invSampleRateOut; - - MA_ASSUME(channels > 0); - for (c = 0; c < channels; c += 1) { - float s = ma_mix_f32_fast(pResampler->x0.f32[c], pResampler->x1.f32[c], a); - pFrameOut[c] = s; - } -} - static MA_INLINE ma_result ma_linear_resampler_process_pcm_frames_s16_no_lpf(ma_linear_resampler* pResampler, const ma_int16* pFramesInS16, ma_uint64* pFrameCountIn, ma_int16* pFramesOutS16, ma_uint64* pFrameCountOut, ma_uint32 invSampleRateOut) { ma_uint64 frameCountIn;