n64: resolve the "first frame" issue

This commit is contained in:
goyuken 2013-05-04 00:47:36 +00:00
parent 1bf7280b75
commit 1abb7cf91a
3 changed files with 7 additions and 4 deletions

View File

@ -488,17 +488,17 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64
m64pEmulator = new Thread(ExecuteEmulator);
m64pEmulator.Start();
int state = -1;
//int state = -1;
/*
do
{
m64pCoreDoCommandRefInt(m64p_command.M64CMD_CORE_STATE_QUERY, 1, ref state);
} while (state != (int)m64p_emu_state.M64EMU_PAUSED);
*/
m64pFrameComplete.WaitOne();
//m64pFrameComplete.WaitOne();
m64pSamplingRate = (uint)AudGetAudioRate();
// because of when we're doing this, we can't call this yet
m64pSamplingRate = 32000; // (uint)AudGetAudioRate();
resampler = new Sound.Utilities.SpeexResampler(6, m64pSamplingRate, 44100, m64pSamplingRate, 44100, null, null);
//Console.WriteLine("N64 Initial ARate {0}", m64pSamplingRate);

View File

@ -999,6 +999,9 @@ void r4300_execute(void)
next_interupt = 624999;
init_interupt();
// now that everything has been set up, we stop here to wait for the first frame
WaitForSingleObject(rompausesem, INFINITE);
if (r4300emu == CORE_PURE_INTERPRETER)
{
DebugMessage(M64MSG_INFO, "Starting R4300 emulator: Pure Interpreter");