summaryrefslogtreecommitdiff
path: root/libretro
diff options
context:
space:
mode:
authorToad King2012-06-14 23:28:56 -0400
committerToad King2012-06-14 23:28:56 -0400
commit8a41736496d4109b2c832ac8b176c5e1ebe9c457 (patch)
treea7f285615b54a69b8d1a9e526bb2993abf528f12 /libretro
parent536905f71f98156807e748449ac205b2e469876c (diff)
downloadsnes9x2002-8a41736496d4109b2c832ac8b176c5e1ebe9c457.tar.gz
snes9x2002-8a41736496d4109b2c832ac8b176c5e1ebe9c457.tar.bz2
snes9x2002-8a41736496d4109b2c832ac8b176c5e1ebe9c457.zip
use the slower, more accurate SPC700 modes
hack around sounds being higher pitched than they should be
Diffstat (limited to 'libretro')
-rw-r--r--libretro/libretro.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp
index 42601fa..4af81a1 100644
--- a/libretro/libretro.cpp
+++ b/libretro/libretro.cpp
@@ -167,8 +167,8 @@ void retro_get_system_info(struct retro_system_info *info)
}
static int16 audio_buf[0x10000];
-static int avail;
-static int samplerate = 32000;
+static unsigned avail;
+static float samplerate = 32040.5f;
void S9xGenerateSound()
{
@@ -368,8 +368,8 @@ void retro_run (void)
{
IPPU.RenderThisFrame = TRUE;
S9xMainLoop();
- S9xMixSamples(audio_buf, avail * 2);
- audio_batch_cb((int16_t *) audio_buf, avail);
+ S9xMixSamples(audio_buf, avail);
+ audio_batch_cb((int16_t *) audio_buf, avail >> 1);
poll_cb();
@@ -427,15 +427,15 @@ bool retro_load_game(const struct retro_game_info *game)
//S9xGraphicsInit();
S9xReset();
- Settings.asmspc700 = true;
- CPU.APU_APUExecuting = Settings.APUEnabled = 3;
+ Settings.asmspc700 = false;
+ CPU.APU_APUExecuting = Settings.APUEnabled = 1;
Settings.SixteenBitSound = true;
so.stereo = Settings.Stereo;
so.playback_rate = Settings.SoundPlaybackRate;
S9xSetPlaybackRate(so.playback_rate);
S9xSetSoundMute(FALSE);
- avail = samplerate / (Settings.PAL ? 50 : 60);
+ avail = (samplerate / (Settings.PAL ? 50 : 60)) << 1;
ZeroMemory(audio_buf, sizeof(audio_buf));