diff --git a/libretro/config.h b/libretro/config.h index c14ee5b..8bf4b34 100644 --- a/libretro/config.h +++ b/libretro/config.h @@ -490,7 +490,7 @@ /* #undef SUPPORTS_SOUND_REINIT */ /* Define to use synchronized sound. */ -/* #undef SYNCHRONIZED_SOUND */ +#define SYNCHRONIZED_SOUND 1 /* Alternate system-wide config file for non-Unix OS. */ /* #undef SYSTEM_WIDE_CFG_FILE */ diff --git a/libretro/core-mapper.c b/libretro/core-mapper.c index 08c3d12..ea0cf19 100644 --- a/libretro/core-mapper.c +++ b/libretro/core-mapper.c @@ -194,7 +194,7 @@ extern unsigned atari_devices[ 2 ]; #include "pokeysnd.h" extern int UI_is_active; -//unsigned char SBUF[1024*2]; +unsigned char SBUF[1024*2]; void retro_sound_update() { @@ -202,24 +202,25 @@ void retro_sound_update() if (! UI_is_active) { - POKEYSND_Process(SNDBUF,snd_sampler_pal); + Sound_Callback(SBUF, 1024); + //POKEYSND_Process(SNDBUF,snd_sampler_pal); for(x=0;x 32767) smp = 32767; else if (smp < -32768) smp = -32768; -*/ + /* if (smp2 > 32767) smp2 = 32767; else if (smp2 < -32768) smp2 = -32768; */ - retro_audio_cb(SNDBUF[x],SNDBUF[x]/*2*/); + retro_audio_cb(smp,smp); } diff --git a/libretro/platform.c b/libretro/platform.c index c0e3edf..0630215 100644 --- a/libretro/platform.c +++ b/libretro/platform.c @@ -61,7 +61,7 @@ int skel_main(int argc, char **argv) printf("Failed to initialise!\n"); return 3; } - POKEYSND_Init(POKEYSND_FREQ_17_EXACT, 44100, 1, 1); + //POKEYSND_Init(POKEYSND_FREQ_17_EXACT, 44100, 1, 1); retro_sound_finalized=1; printf("First retrun to main thread!\n"); @@ -294,9 +294,10 @@ int PLATFORM_SoundSetup(Sound_setup_t *setup) { //force 16 bit stereo sound at 44100 setup->freq=44100; - setup->sample_size=2; - setup->channels=2; - setup->buffer_ms=20; + setup->sample_size=1; + setup->channels=1; +// setup->buffer_ms=20; + setup->buffer_frames = 1024; return TRUE; }