From 8dc95da1ac37162df6a7d529231425d62561db50 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 16 Sep 2014 00:27:23 +0200 Subject: [PATCH] (Nearest Resampler) C89 build fixes --- audio/resamplers/nearest.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/audio/resamplers/nearest.c b/audio/resamplers/nearest.c index 704ea69299..1bad743a44 100644 --- a/audio/resamplers/nearest.c +++ b/audio/resamplers/nearest.c @@ -6,7 +6,7 @@ #include #include -#ifndef RESAMPLER_TEST +#if !defined(RESAMPLER_TEST) && defined(RARCH_INTERNAL) #include "../../general.h" #else #define RARCH_LOG(...) fprintf(stderr, __VA_ARGS__) @@ -15,29 +15,23 @@ typedef struct rarch_nearest_resampler { float fraction; -}rarch_nearest_resampler_t; +} rarch_nearest_resampler_t; +typedef struct audio_frame_float +{ + float l; + float r; +} audio_frame_float_t; static void resampler_nearest_process(void *re_, struct resampler_data *data) { - (void)re_; - float ratio; - rarch_nearest_resampler_t *re = (rarch_nearest_resampler_t*)re_; - - typedef struct audio_frame_float - { - float l; - float r; - }audio_frame_float_t; - audio_frame_float_t *inp = (audio_frame_float_t*)data->data_in; audio_frame_float_t *inp_max = inp + data->input_frames; audio_frame_float_t *outp = (audio_frame_float_t*)data->data_out; - - ratio = 1.0/data->ratio; + float ratio = ratio = 1.0/data->ratio; while(inp != inp_max) {