Make AudioDevice::setFormat thread-safe
Jeffrey Pfau jeffrey@endrift.com
Wed, 15 Oct 2014 04:48:18 -0700
1 files changed,
2 insertions(+),
1 deletions(-)
jump to
M
src/platform/qt/AudioDevice.cpp
→
src/platform/qt/AudioDevice.cpp
@@ -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) {