From 7cfd2b999978874608944c3503c9e64b69fc28ef Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Mon, 30 Mar 2009 06:28:15 +0000 Subject: [PATCH] add some docs to the lle-testing vcproj and try to shutdown the plugin without crashing git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2794 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Common.vcproj | 4 - .../Plugin_DSP_LLE_Test.vcproj | 170 +++++++++++++++++- .../Plugin_DSP_LLE-testing/Src/main.cpp | 12 +- 3 files changed, 176 insertions(+), 10 deletions(-) diff --git a/Source/Core/Common/Common.vcproj b/Source/Core/Common/Common.vcproj index c86cb67f28..c4af80238f 100644 --- a/Source/Core/Common/Common.vcproj +++ b/Source/Core/Common/Common.vcproj @@ -498,10 +498,6 @@ - - diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Plugin_DSP_LLE_Test.vcproj b/Source/Plugins/Plugin_DSP_LLE-testing/Plugin_DSP_LLE_Test.vcproj index 9d55d6f22d..997e4efb95 100644 --- a/Source/Plugins/Plugin_DSP_LLE-testing/Plugin_DSP_LLE_Test.vcproj +++ b/Source/Plugins/Plugin_DSP_LLE-testing/Plugin_DSP_LLE_Test.vcproj @@ -709,15 +709,179 @@ Name="Docs" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/main.cpp b/Source/Plugins/Plugin_DSP_LLE-testing/Src/main.cpp index 8a7f6f7e43..d8f55c1ee8 100644 --- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/main.cpp +++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/main.cpp @@ -38,7 +38,7 @@ PLUGIN_GLOBALS* globals = NULL; DSPInitialize g_dspInitialize; -Common::Thread *g_hDSPThread; +Common::Thread *g_hDSPThread = NULL; SoundStream *soundStream = NULL; @@ -52,6 +52,7 @@ extern u32 m_addressPBs; bool AXTask(u32& _uMail); bool bCanWork = false; +bool bIsRunning = false; ////////////////////////////////////////////////////////////////////////// // UGLY wxw stuff, TODO fix up @@ -168,14 +169,15 @@ void DllDebugger(HWND _hParent, bool Show) // Regular thread THREAD_RETURN dsp_thread(void* lpParameter) { - while (1) + while (bIsRunning) { if (!gdsp_run()) { - PanicAlert("ERROR: DSP Halt"); + ERROR_LOG(AUDIO, "DSP Halt"); return 0; } } + return 0; } // Debug thread @@ -217,6 +219,8 @@ void Initialize(void *init) if(!bCanWork) return; // TODO: Don't let it work + + bIsRunning = true; g_hDSPThread = new Common::Thread(dsp_thread, NULL); @@ -233,6 +237,8 @@ void DSP_StopSoundStream() void Shutdown(void) { + bIsRunning = false; + gdsp_stop(); AudioCommon::ShutdownSoundStream(); }