diff --git a/android/app/src/cpp/android_host_interface.cpp b/android/app/src/cpp/android_host_interface.cpp index 754dfc7f8..66e58623f 100644 --- a/android/app/src/cpp/android_host_interface.cpp +++ b/android/app/src/cpp/android_host_interface.cpp @@ -473,9 +473,9 @@ void AndroidHostInterface::SurfaceChanged(ANativeWindow* surface, int format, in m_display->ChangeRenderWindow(wi); if (surface && System::GetState() == System::State::Paused) - System::SetState(System::State::Running); + PauseSystem(false); else if (!surface && System::IsRunning()) - System::SetState(System::State::Paused); + PauseSystem(true); } } diff --git a/src/frontend-common/common_host_interface.cpp b/src/frontend-common/common_host_interface.cpp index 2288060a7..188f2f12d 100644 --- a/src/frontend-common/common_host_interface.cpp +++ b/src/frontend-common/common_host_interface.cpp @@ -164,7 +164,10 @@ void CommonHostInterface::PauseSystem(bool paused) return; System::SetState(paused ? System::State::Paused : System::State::Running); + if (!paused) + m_audio_stream->EmptyBuffers(); m_audio_stream->PauseOutput(paused); + OnSystemPaused(paused); UpdateSpeedLimiterState();