Qt: Copy state from old audio processor to new
Jeffrey Pfau jeffrey@endrift.com
Sun, 22 Feb 2015 21:17:41 -0800
1 files changed,
2 insertions(+),
0 deletions(-)
M
src/platform/qt/GameController.cpp
→
src/platform/qt/GameController.cpp
@@ -464,8 +464,10 @@ }
void GameController::reloadAudioDriver() { QMetaObject::invokeMethod(m_audioProcessor, "pause", Qt::BlockingQueuedConnection); + int samples = m_audioProcessor->getBufferSamples(); delete m_audioProcessor; m_audioProcessor = AudioProcessor::create(); + m_audioProcessor->setBufferSamples(samples); m_audioProcessor->moveToThread(m_audioThread); connect(this, SIGNAL(gameStarted(GBAThread*)), m_audioProcessor, SLOT(start())); connect(this, SIGNAL(gameStopped(GBAThread*)), m_audioProcessor, SLOT(pause()));