diff --git a/libretro/libretro.c b/libretro/libretro.c index 5fde1ed..e8d43cc 100644 --- a/libretro/libretro.c +++ b/libretro/libretro.c @@ -267,7 +267,6 @@ static const double ntsc_fps = 53693175.0 / (3420.0 * 262.0); static void init_audio(void) { audio_init(44100, vdp_pal ? pal_fps : ntsc_fps); - soundbuffer = malloc(snd.buffer_size * 2 * 2); } static void configure_controls(void) @@ -805,9 +804,6 @@ void retro_unload_game(void) { if (system_hw == SYSTEM_MCD) slot_autosave(0); - - if (soundbuffer) - free(soundbuffer); } unsigned retro_get_region(void) { return vdp_pal ? RETRO_REGION_PAL : RETRO_REGION_NTSC; } @@ -911,7 +907,7 @@ void retro_deinit(void) void retro_reset(void) { gen_reset(0); } -int16 *soundbuffer; +int16 soundbuffer[3068]; void osd_input_update(void) { diff --git a/libretro/osd.h b/libretro/osd.h index 42a68bd..95009c8 100644 --- a/libretro/osd.h +++ b/libretro/osd.h @@ -104,7 +104,7 @@ extern char MS_BIOS_US[256]; extern char MS_BIOS_EU[256]; extern char MS_BIOS_JP[256]; -extern int16 *soundbuffer; +extern int16 soundbuffer[3068]; #define VERSION "Genesis Plus GX 1.7.0 (libretro)"