From 0dcc4df2496a6d3f01bf9387a26e5af8d9c2ed69 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Tue, 17 Nov 2015 19:48:56 -0800 Subject: [PATCH] Qt: Fix race condition with setting sample rate --- CHANGES | 1 + src/platform/qt/GameController.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index e67377176..8ea25461c 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,7 @@ Bugfixes: - OpenGL: Fix fast-forward on some OpenGL drivers where it may block early - GBA BIOS: Fix Sqrt sign - GBA BIOS: Fix misaligned RLUnCompReadNormalWrite* + - Qt: Fix race condition with setting sample rate Misc: - GBA Audio: Implement missing flags on SOUNDCNT_X register diff --git a/src/platform/qt/GameController.cpp b/src/platform/qt/GameController.cpp index dfee2d74b..b1931c3e7 100644 --- a/src/platform/qt/GameController.cpp +++ b/src/platform/qt/GameController.cpp @@ -597,7 +597,7 @@ void GameController::setAudioBufferSamples(int samples) { threadInterrupt(); redoSamples(samples); threadContinue(); - QMetaObject::invokeMethod(m_audioProcessor, "setBufferSamples", Q_ARG(int, samples)); + QMetaObject::invokeMethod(m_audioProcessor, "setBufferSamples", Qt::BlockingQueuedConnection, Q_ARG(int, samples)); } }