mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 15:45:42 +00:00
Android: Empty audio buffers when returning from activity
This commit is contained in:
parent
f68ad7d0c3
commit
8cb89636eb
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue