summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornakeee <nakeee@gmail.com>2009-03-29 20:18:55 +0000
committernakeee <nakeee@gmail.com>2009-03-29 20:18:55 +0000
commite2a9f8c3bb3a656ff86f3f37aaaf93ff6d612b2a (patch)
tree82400cbd4cb4fb0d4d323c2ff7d7768c8c8a2ca1
parentb6dd1d3f0a518d2a7a01ba453b2ecc4ba307f5d2 (diff)
solve deadlock
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2788 8ced0084-cf51-0410-be5f-012b33b47a6e
-rw-r--r--Source/Plugins/Plugin_DSP_LLE-testing/Src/gdsp_interpreter.cpp24
-rw-r--r--Source/Plugins/Plugin_DSP_LLE-testing/Src/main.cpp8
2 files changed, 14 insertions, 18 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 f2df660cc8..f46cb68484 100644
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/gdsp_interpreter.cpp
+++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/gdsp_interpreter.cpp
@@ -360,11 +360,11 @@ void gdsp_stop()
#include "disassemble.h"
-#include "WaveFile.h"
+//#include "WaveFile.h"
#include "Mixer.h"
uint16 r30 = 0, r31 = 0;
-extern WaveFileWriter g_wave_writer;
+//extern WaveFileWriter g_wave_writer;
extern uint16 dsp_swap16(uint16 x);
void Hacks()
@@ -417,7 +417,7 @@ void Hacks()
}
} */
- /* if (g_dsp.pc == 0x468)
+ if (g_dsp.pc == 0x468)
{
int numSamples = g_dsp.r[25] / 2;
uint16 bufferAddr = g_dsp.r[27];
@@ -429,15 +429,15 @@ void Hacks()
{
samples[i] = dsp_dmem_read(bufferAddr+i);
}
- PushSamples(samples, numSamples / 2, 32000); //sample_rate);
+ soundStream->GetMixer()->PushSamples(samples, numSamples / 2, 32000); //sample_rate);
- g_wave_writer.AddStereoSamples(samples, numSamples/2); // 2 channels
-
- if (g_wave_writer.GetAudioSize() > 1024*1024*2)
- {
+ // g_wave_writer.AddStereoSamples(samples, numSamples/2); // 2 channels
+
+ // if (g_wave_writer.GetAudioSize() > 1024*1024*2)
+ // {
//PanicAlert("%x", bufferAddr);
- g_wave_writer.Stop();
- exit(1);
- }
- }*/
+ // g_wave_writer.Stop();
+ // exit(1);
+ // }
+ }
}
diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/main.cpp b/Source/Plugins/Plugin_DSP_LLE-testing/Src/main.cpp
index 7fc03e6de1..8debe86afd 100644
--- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/main.cpp
+++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/main.cpp
@@ -336,19 +336,15 @@ void DSP_Update(int cycles)
{
#ifdef _WIN32
if (g_Dialog.CanDoStep())
-#endif
gdsp_runx(100); // cycles
+#endif
+ soundStream->Update();
}
void DSP_SendAIBuffer(unsigned int address, int sample_rate)
{
- // TODO: This is not yet fully threadsafe.
- if (!soundStream) {
- return;
- }
-
if (soundStream->GetMixer())
{
short samples[16] = {0}; // interleaved stereo