mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-04-25 19:19:02 +00:00
Fix ASSERT when disabling/enabling soundtype (#295)
This commit is contained in:
+3
-3
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user