Make AudioDevice::setFormat thread-safe

This commit is contained in:
Jeffrey Pfau 2014-10-15 04:48:18 -07:00
parent 7353092b84
commit ddd8c8db29
1 changed files with 2 additions and 1 deletions

View File

@ -19,8 +19,9 @@ void AudioDevice::setFormat(const QAudioFormat& format) {
if (!GBAThreadHasStarted(m_context)) {
return;
}
// TODO: make this thread-safe
GBAThreadInterrupt(m_context);
m_ratio = GBAAudioCalculateRatio(&m_context->gba->audio, m_context->fpsTarget, format.sampleRate());
GBAThreadContinue(m_context);
}
void AudioDevice::setInput(GBAThread* input) {