SPU2: Restore functionality to switch modules on the fly without being tied to GS window status.

This commit is contained in:
Christian Kenny 2021-07-18 03:13:40 -04:00 committed by refractionpcsx2
parent 9d9e8a9217
commit 55d0d40697
1 changed files with 14 additions and 0 deletions

View File

@ -41,7 +41,21 @@ u32 lClocks = 0;
void SPU2configure()
{
ScopedCoreThreadPause paused_core;
SndBuffer::Cleanup();
configure();
try
{
Console.Warning("SPU2: Sound output module reset");
SndBuffer::Init();
}
catch (std::exception& ex)
{
fprintf(stderr, "SPU2 Error: Could not initialize device, or something.\nReason: %s", ex.what());
SPU2close();
}
paused_core.AllowResume();
}