From d6d26deedac7bad720d1a9be2e6f32dd72d445fe Mon Sep 17 00:00:00 2001 From: David Reid Date: Mon, 16 Feb 2026 07:12:42 +1000 Subject: [PATCH] Fix some compilation errors with the resampling test. --- tests/resampling/resampling.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/resampling/resampling.c b/tests/resampling/resampling.c index 0ab126b6..4ccf3e4f 100644 --- a/tests/resampling/resampling.c +++ b/tests/resampling/resampling.c @@ -338,8 +338,8 @@ static void profile_resampler_miniaudio(resampling_api api, ma_format format, ma while (totalFramesRead < RESAMPLING_FRAMES_PER_ITERATION) { SRC_DATA data; - data.data_in = ma_offset_pcm_frames_ptr(pSamplesIn, totalFramesRead, format, channels); - data.data_out = pSamplesOut; + data.data_in = (float*)ma_offset_pcm_frames_ptr(pSamplesIn, totalFramesRead, format, channels); + data.data_out = (float*)pSamplesOut; data.input_frames = RESAMPLING_FRAMES_PER_ITERATION - totalFramesRead; data.output_frames = framesOutCap; data.src_ratio = (double)sampleRateOut / sampleRateIn; /* I think libsamplerate's ratio is out/in, whereas miniaudio is in/out. Advice welcome if I am wrong about this. */ @@ -379,9 +379,9 @@ static void profile_resampler_miniaudio(resampling_api api, ma_format format, ma spx_uint32_t out_len = (spx_uint32_t)framesOutCap; if (format == ma_format_f32) { - speex_resampler_process_interleaved_float(pState, ma_offset_pcm_frames_ptr(pSamplesIn, totalFramesRead, format, channels), &in_len, pSamplesOut, &out_len); + speex_resampler_process_interleaved_float(pState, (const float*)ma_offset_pcm_frames_ptr(pSamplesIn, totalFramesRead, format, channels), &in_len, (float*)pSamplesOut, &out_len); } else { - speex_resampler_process_interleaved_int(pState, ma_offset_pcm_frames_ptr(pSamplesIn, totalFramesRead, format, channels), &in_len, pSamplesOut, &out_len); + speex_resampler_process_interleaved_int(pState, (const spx_int16_t*)ma_offset_pcm_frames_ptr(pSamplesIn, totalFramesRead, format, channels), &in_len, (spx_int16_t*)pSamplesOut, &out_len); } totalFramesRead += in_len;