Rename a macro.

This commit is contained in:
David Reid
2026-02-13 19:10:53 +10:00
parent db1bc8c4b7
commit 9d0f4a4103
+13 -13
View File
@@ -58973,8 +58973,8 @@ static void ma_linear_resampler_adjust_timer_for_new_rate(ma_linear_resampler* p
}
/* A cache of samples unrelated to the LPF comes first and needs to be skipped. */
#define MA_RESAMPLER_GET_LPF_HEAP_F32(pResampler, lpfIndex) pResampler->lpf.f32 + (lpfIndex * (4 + (pResampler->channels*2)))
#define MA_RESAMPLER_GET_LPF_HEAP_S32(pResampler, lpfIndex) pResampler->lpf.s32 + (lpfIndex * (4 + (pResampler->channels*2)))
#define MA_LINEAR_RESAMPLER_GET_LPF_STATE_F32(pResampler, lpfIndex) pResampler->lpf.f32 + (lpfIndex * (4 + (pResampler->channels*2)))
#define MA_LINEAR_RESAMPLER_GET_LPF_STATE_S32(pResampler, lpfIndex) pResampler->lpf.s32 + (lpfIndex * (4 + (pResampler->channels*2)))
static ma_result ma_linear_resampler_set_rate_internal(ma_linear_resampler* pResampler, ma_uint32 sampleRateIn, ma_uint32 sampleRateOut, ma_bool32 isResamplerAlreadyInitialized)
{
@@ -59045,7 +59045,7 @@ static ma_result ma_linear_resampler_set_rate_internal(ma_linear_resampler* pRes
a2 /= a0;
if (pResampler->format == ma_format_f32) {
float* pLPF = MA_RESAMPLER_GET_LPF_HEAP_F32(pResampler, iLPF);
float* pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_F32(pResampler, iLPF);
/* We can now initialize our biquad parameters. */
pLPF[0] = b1;
@@ -59062,7 +59062,7 @@ static ma_result ma_linear_resampler_set_rate_internal(ma_linear_resampler* pRes
MA_ZERO_MEMORY(pLPF + 4, sizeof(float) * pResampler->channels * 2);
}
} else {
ma_int32* pLPF = MA_RESAMPLER_GET_LPF_HEAP_S32(pResampler, iLPF);
ma_int32* pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_S32(pResampler, iLPF);
pLPF[0] = ma_biquad_float_to_fp(b1);
pLPF[1] = ma_biquad_float_to_fp(b2);
@@ -59942,7 +59942,7 @@ static MA_INLINE void ma_linear_resampler_filter_s16(ma_linear_resampler* pResam
ma_uint32 lpfCount = pResampler->lpfOrder >> 1; /* TODO: It's actually more useful to store lpfCount instead of lpfOrder. */
ma_uint32 iChannel;
pLPF = MA_RESAMPLER_GET_LPF_HEAP_S32(pResampler, 0);
pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_S32(pResampler, 0);
for (iLPF = 0; iLPF < lpfCount; iLPF += 1) {
ma_int32 b1 = pLPF[0];
ma_int32 b2 = pLPF[1];
@@ -59996,7 +59996,7 @@ static MA_INLINE void ma_linear_resampler_filter_s32(ma_linear_resampler* pResam
ma_uint32 lpfCount = pResampler->lpfOrder >> 1; /* TODO: It's actually more useful to store lpfCount instead of lpfOrder. */
ma_uint32 iChannel;
pLPF = MA_RESAMPLER_GET_LPF_HEAP_S32(pResampler, 0);
pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_S32(pResampler, 0);
for (iLPF = 0; iLPF < lpfCount; iLPF += 1) {
ma_int32 b1 = pLPF[0];
ma_int32 b2 = pLPF[1];
@@ -60032,7 +60032,7 @@ static MA_INLINE void ma_linear_resampler_filter_s32_mono(ma_linear_resampler* p
ma_uint32 lpfCount = pResampler->lpfOrder >> 1; /* TODO: It's actually more useful to store lpfCount instead of lpfOrder. */
ma_uint32 iChannel;
pLPF = MA_RESAMPLER_GET_LPF_HEAP_S32(pResampler, 0);
pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_S32(pResampler, 0);
for (iLPF = 0; iLPF < lpfCount; iLPF += 1) {
ma_int32 b1 = pLPF[0];
ma_int32 b2 = pLPF[1];
@@ -60068,7 +60068,7 @@ static MA_INLINE void ma_linear_resampler_filter_s32_stereo(ma_linear_resampler*
ma_uint32 lpfCount = pResampler->lpfOrder >> 1; /* TODO: It's actually more useful to store lpfCount instead of lpfOrder. */
ma_uint32 iChannel;
pLPF = MA_RESAMPLER_GET_LPF_HEAP_S32(pResampler, 0);
pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_S32(pResampler, 0);
for (iLPF = 0; iLPF < lpfCount; iLPF += 1) {
ma_int32 b1 = pLPF[0];
ma_int32 b2 = pLPF[1];
@@ -60128,7 +60128,7 @@ static MA_INLINE void ma_linear_resampler_filter_f32(ma_linear_resampler* pResam
ma_uint32 lpfCount = pResampler->lpfOrder >> 1; /* TODO: It's actually more useful to store lpfCount instead of lpfOrder. */
ma_uint32 iChannel;
pLPF = MA_RESAMPLER_GET_LPF_HEAP_F32(pResampler, 0);
pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_F32(pResampler, 0);
for (iLPF = 0; iLPF < lpfCount; iLPF += 1) {
float b1 = pLPF[0];
float b2 = pLPF[1];
@@ -60164,7 +60164,7 @@ static MA_INLINE void ma_linear_resampler_filter_f32_mono(ma_linear_resampler* p
ma_uint32 lpfCount = pResampler->lpfOrder >> 1; /* TODO: It's actually more useful to store lpfCount instead of lpfOrder. */
ma_uint32 iChannel;
pLPF = MA_RESAMPLER_GET_LPF_HEAP_F32(pResampler, 0);
pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_F32(pResampler, 0);
for (iLPF = 0; iLPF < lpfCount; iLPF += 1) {
float b1 = pLPF[0];
float b2 = pLPF[1];
@@ -60200,7 +60200,7 @@ static MA_INLINE void ma_linear_resampler_filter_f32_stereo(ma_linear_resampler*
ma_uint32 lpfCount = pResampler->lpfOrder >> 1; /* TODO: It's actually more useful to store lpfCount instead of lpfOrder. */
ma_uint32 iChannel;
pLPF = MA_RESAMPLER_GET_LPF_HEAP_F32(pResampler, 0);
pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_F32(pResampler, 0);
for (iLPF = 0; iLPF < lpfCount; iLPF += 1) {
float b1 = pLPF[0];
float b2 = pLPF[1];
@@ -61400,10 +61400,10 @@ MA_API ma_result ma_linear_resampler_reset(ma_linear_resampler* pResampler)
/* The low pass filter needs to have its cache reset. */
for (iLPF = 0; iLPF < pResampler->lpfOrder/2; iLPF += 1) {
if (pResampler->format == ma_format_f32) {
float* pLPF = MA_RESAMPLER_GET_LPF_HEAP_F32(pResampler, iLPF);
float* pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_F32(pResampler, iLPF);
MA_ZERO_MEMORY(pLPF + 4, sizeof(float) * pResampler->channels * 2);
} else {
ma_int32* pLPF = MA_RESAMPLER_GET_LPF_HEAP_S32(pResampler, iLPF);
ma_int32* pLPF = MA_LINEAR_RESAMPLER_GET_LPF_STATE_S32(pResampler, iLPF);
MA_ZERO_MEMORY(pLPF + 4, sizeof(ma_int32) * pResampler->channels * 2);
}
}