Rough fix for freeze-up bug

Added startJobs() to the waitForJobs() loop, and don't give up in
masterMix() until status of master channel is Done.
This commit is contained in:
Andrew Kelley
2009-10-13 03:14:23 -07:00
parent 95eb60f05f
commit 45a2f81eaa
2 changed files with 5 additions and 2 deletions

View File

@@ -620,7 +620,7 @@ public:
m->m_workers[m->m_numWorkers]->processJobQueue();
while( s_jobQueue.itemsDone < s_jobQueue.queueSize )
{
SPINLOCK_PAUSE();
startJobs();
}
}

View File

@@ -492,7 +492,10 @@ void FxMixer::masterMix( sampleFrame * _buf )
// to be processed.
MixerWorkerThread::resetJobQueue();
addChannelLeaf( 0, _buf );
MixerWorkerThread::startAndWaitForJobs();
while( m_fxChannels[0]->m_state != ThreadableJob::Done )
{
MixerWorkerThread::startAndWaitForJobs();
}
memcpy( _buf, m_fxChannels[0]->m_buffer, sizeof( sampleFrame ) * fpp );