solve deadlock

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2788 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee 2009-03-29 20:18:55 +00:00
parent b6dd1d3f0a
commit e2a9f8c3bb
2 changed files with 14 additions and 18 deletions

View File

@ -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);
// }
}
}

View File

@ -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