From a2855dcf2d80b87a136b7e2834476579d10b6844 Mon Sep 17 00:00:00 2001 From: "XTra.KrazzY" Date: Wed, 8 Apr 2009 12:37:15 +0000 Subject: [PATCH] Pausing now works in LLE-Testing git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2926 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../Plugin_DSP_LLE-testing/Src/gdsp_interpreter.cpp | 4 ++++ Source/Plugins/Plugin_DSP_LLE-testing/Src/main.cpp | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/gdsp_interpreter.cpp b/Source/Plugins/Plugin_DSP_LLE-testing/Src/gdsp_interpreter.cpp index 8529c1e678..9ae6a58781 100644 --- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/gdsp_interpreter.cpp +++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/gdsp_interpreter.cpp @@ -311,6 +311,10 @@ bool gdsp_run() while (!cr_halt) { + // Are we running? + if(*g_dspInitialize.pEmulatorState) + break; + gdsp_step(); if (!gdsp_running) diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/main.cpp b/Source/Plugins/Plugin_DSP_LLE-testing/Src/main.cpp index 0f3ee04eee..6dc61bb020 100644 --- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/main.cpp +++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/main.cpp @@ -225,8 +225,10 @@ void Initialize(void *init) PanicAlert("Failed loading DSP COEF from " DSP_COEF_FILE); } - if (!bCanWork) - return; // TODO: Don't let it work + if (!bCanWork) { + gdsp_shutdown(); + return; + } bIsRunning = true; @@ -356,8 +358,8 @@ void DSP_SendAIBuffer(unsigned int address, int sample_rate) // so each sample now triggers the sound stream) // TODO: think about this. - static int counter = 0; - counter++; - if ((counter & 31) == 0 && soundStream) + //static int counter = 0; + //counter++; + if (/*(counter & 31) == 0 &&*/ soundStream) soundStream->Update(); }