Fix ASSERT when disabling/enabling soundtype (#295)

This commit is contained in:
tomcw 2015-06-20 12:33:45 -07:00
parent 1f566088af
commit ed0e8925a4

View File

@ -223,7 +223,7 @@ void SpkrDestroy ()
g_pSpeakerBuffer = NULL;
g_pRemainderBuffer = NULL;
}
else
else if (soundtype == SOUND_DIRECT || soundtype == SOUND_SMART)
{
InternalBeep(0,0);
}
@ -325,8 +325,8 @@ void SpkrReset()
BOOL SpkrSetEmulationType (HWND window, DWORD newtype)
{
if (soundtype != SOUND_NONE)
SpkrDestroy();
SpkrDestroy(); // GH#295: Destroy for all types (even SOUND_NONE)
soundtype = newtype;
if (soundtype != SOUND_NONE)
SpkrInitialize();