Handle iOS audio session interruptions by reinitializing audio

This commit is contained in:
Kentucky Compass committed 2017-12-31 00:37:20 -08:00
1 parent 8e1ab3f6ff
commit d8b3f4af33
3 files changed
+97 -3

No files matched your search

+8 -2
View File
@@ -134,6 +134,13 @@ void Audio_Init() {
}
}
void Audio_Shutdown() {
if (audioInitialized) {
audioInitialized = false;
host->ShutdownSound();
}
}
bool IsOnSeparateCPUThread() {
if (cpuThread != nullptr) {
return cpuThreadID == std::this_thread::get_id();
@@ -290,8 +297,7 @@ void CPU_Shutdown() {
__KernelShutdown();
HLEShutdown();
if (coreParameter.enableSound) {
host->ShutdownSound();
audioInitialized = false; // deleted in ShutdownSound
Audio_Shutdown();
}
pspFileSystem.Shutdown();
mipsr4k.Shutdown();