From ae5fb3ae9006d90c32cba9efad3dd1645972117a Mon Sep 17 00:00:00 2001 From: João Silva Date: Sun, 12 Feb 2017 02:40:43 +0000 Subject: Integer-only C4 from snes9x2002. Integer-only, finalized DSP1 from snes9x 1.50. Integer-only libretro.c and seta010.c. --- libretro.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libretro.c') diff --git a/libretro.c b/libretro.c index 53c652e..f2056b9 100644 --- a/libretro.c +++ b/libretro.c @@ -43,8 +43,8 @@ char slash = '\\'; char slash = '/'; #endif -static float samples_per_frame = 0.0; -static float samplerate = (((SNES_CLOCK_SPEED * 6) / (32 * ONE_APU_CYCLE))); +static int32_t samples_per_frame = 0; +static int32_t samplerate = (((SNES_CLOCK_SPEED * 6) / (32 * ONE_APU_CYCLE))); #ifdef PERF_TEST #define RETRO_PERFORMANCE_INIT(name) \ @@ -400,7 +400,7 @@ static void check_variables(void) #define FRAMESKIP #endif -static float samples_to_play = 0.0; +static int32_t samples_to_play = 0; void retro_run(void) { bool updated = false; @@ -427,13 +427,13 @@ void retro_run(void) if (samples_to_play > 512) { - S9xMixSamples(audio_buf, ((int32_t)samples_to_play) * 2); - audio_batch_cb(audio_buf, (int32_t)samples_to_play); - samples_to_play -= (int32_t)samples_to_play; + S9xMixSamples(audio_buf, samples_to_play * 2); + audio_batch_cb(audio_buf, samples_to_play); + samples_to_play = 0; } #endif -#ifdef NO_VIDEO_OUTPUT +#ifdef NO_VIDEO_OUTPUT return; #endif @@ -767,7 +767,7 @@ void retro_cheat_set(unsigned index, bool enabled, const char* code) Cheat.c[index].saved = false; // it'll be saved next time cheats run anyways - Settings.ApplyCheats=true; + Settings.ApplyCheats = true; S9xApplyCheats(); #endif } -- cgit v1.2.3