Refactor Mockingboard into a class (#1171)

Mockingboard or Phasor cards can be inserted into any slot.
Change Config->Sound to that slots 4+5 to be individually selected for the 3 soundcard types.
Add MockingboardCardManager class to manage multiple cards and mix the sound buffers.
This commit is contained in:
TomCh
2023-01-28 18:15:28 +00:00
committed by GitHub
parent 4668718fb3
commit 71c67cf132
30 changed files with 1439 additions and 1251 deletions
+2 -2
View File
@@ -388,7 +388,7 @@ static void Snapshot_LoadState_v2(void)
GetVideo().SetVidHD(false); // Set true later only if VidHDCard is instantiated
GetVideo().VideoResetState();
GetVideo().SetVideoRefreshRate(VR_60HZ); // Default to 60Hz as older save-states won't contain refresh rate
MB_InitializeForLoadingSnapshot(); // GH#609
GetCardMgr().GetMockingboardCardMgr().InitializeForLoadingSnapshot(); // GH#609
#ifdef USE_SPEECH_API
g_Speech.Reset();
#endif
@@ -402,7 +402,7 @@ static void Snapshot_LoadState_v2(void)
throw std::runtime_error("Unknown top-level scalar: " + scalar);
}
MB_SetCumulativeCycles();
GetCardMgr().GetMockingboardCardMgr().SetCumulativeCycles();
frame.SetLoadedSaveStateFlag(true);
// NB. The following disparity should be resolved: