diff options
author | João Silva | 2017-02-12 02:40:43 +0000 |
---|---|---|
committer | João Silva | 2017-02-12 02:40:43 +0000 |
commit | ae5fb3ae9006d90c32cba9efad3dd1645972117a (patch) | |
tree | cddb693fc5c982294a48c086c655d02c180c596d /libretro.c | |
parent | 3777d1fcf4232cde426f46b7ee5c374fd949b1b0 (diff) | |
download | snes9x2005-ae5fb3ae9006d90c32cba9efad3dd1645972117a.tar.gz snes9x2005-ae5fb3ae9006d90c32cba9efad3dd1645972117a.tar.bz2 snes9x2005-ae5fb3ae9006d90c32cba9efad3dd1645972117a.zip |
Integer-only C4 from snes9x2002. Integer-only, finalized DSP1 from snes9x 1.50. Integer-only libretro.c and seta010.c.
Diffstat (limited to 'libretro.c')
-rw-r--r-- | libretro.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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 } |