all repos — mgba @ afbadf242be6b45586663c08ec974f48f3391874

mGBA Game Boy Advance Emulator

Qt: Copy state from old audio processor to new
Jeffrey Pfau jeffrey@endrift.com
Sun, 22 Feb 2015 21:17:41 -0800
commit

afbadf242be6b45586663c08ec974f48f3391874

parent

27c4308ef57581d75326bc0abb78c77288e560a5

1 files changed, 2 insertions(+), 0 deletions(-)

jump to
M src/platform/qt/GameController.cppsrc/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()));