Remove old sound-card specific code

This commit is contained in:
tomcw
2025-11-22 21:34:59 +00:00
parent 74b72462d2
commit f11f68d622
2 changed files with 2 additions and 116 deletions

View File

@@ -47,33 +47,11 @@ const char CPageSound::m_defaultHDDOptions[] =
"Select Hard Disk Image...\0"
"Unplug Hard Disk Image\0";
const char CPageSound::m_soundchoices[] = "Disabled\0"
"Sound Card\0";
const char CPageSound::m_soundCardChoices[] = "Mockingboard\0"
"Phasor\0"
"SAM\0"
"Empty\0";
// Don't reveal MegaAudio/SD Music cards unless it's been specified from the command line.
// The reasons being are that:
// . this card is purely for regression testing against mb-audit
// . it's confusing to offer this to the end user
const char CPageSound::m_soundCardChoicesEx[] = "Mockingboard\0"
"Phasor\0"
"SAM\0"
"Empty\0"
"MEGA Audio\0"
"SD Music\0";
const char CPageSound::m_auxChoices[] = "80-column (1KB)\0"
"Extended 80-column (64KB)\0"
"RamWorks III (1MB)\0"
"Empty\0";
const char CPageSound::m_soundCardChoice_Unavailable[] = "Unavailable\0\0"; // doubly-null terminate
INT_PTR CALLBACK CPageSound::DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
{
// Switch from static func to our instance
@@ -140,19 +118,6 @@ INT_PTR CPageSound::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPAR
else
_ASSERT(0);
#if 0
switch (newChoiceItem)
{
case SC_MOCKINGBOARD: newCard = CT_MockingboardC; break;
case SC_PHASOR: newCard = CT_Phasor; break;
case SC_SAM: newCard = CT_SAM; break;
case SC_EMPTY: newCard = CT_Empty; break;
case SC_MEGAAUDIO: newCard = CT_MegaAudio; break;
case SC_SDMUSIC: newCard = CT_SDMusic; break;
default: _ASSERT(0); break;
}
#endif
m_PropertySheetHelper.GetConfigNew().m_Slot[slot] = newCard;
if (newCard == CT_Disk2 || newCard == CT_GenericHDD)
@@ -187,24 +152,8 @@ INT_PTR CPageSound::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPAR
break;
case WM_INITDIALOG:
{
#if 0
m_PropertySheetHelper.FillComboBox(hWnd,IDC_SOUNDTYPE, m_soundchoices, (int)soundtype);
SendDlgItemMessage(hWnd,IDC_SPKR_VOLUME,TBM_SETRANGE,1,MAKELONG(VOLUME_MIN,VOLUME_MAX));
SendDlgItemMessage(hWnd,IDC_SPKR_VOLUME,TBM_SETPAGESIZE,0,10);
SendDlgItemMessage(hWnd,IDC_SPKR_VOLUME,TBM_SETTICFREQ,10,0);
SendDlgItemMessage(hWnd,IDC_SPKR_VOLUME,TBM_SETPOS,1,SpkrGetVolume());
SendDlgItemMessage(hWnd,IDC_MB_VOLUME,TBM_SETRANGE,1,MAKELONG(VOLUME_MIN,VOLUME_MAX));
SendDlgItemMessage(hWnd,IDC_MB_VOLUME,TBM_SETPAGESIZE,0,10);
SendDlgItemMessage(hWnd,IDC_MB_VOLUME,TBM_SETTICFREQ,10,0);
SendDlgItemMessage(hWnd,IDC_MB_VOLUME,TBM_SETPOS,1, GetCardMgr().GetMockingboardCardMgr().GetVolume());
#endif
InitOptions(hWnd);
break;
}
InitOptions(hWnd);
break;
}
return FALSE;
@@ -212,14 +161,6 @@ INT_PTR CPageSound::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPAR
void CPageSound::DlgOK(HWND hWnd)
{
// const SoundType_e newSoundType = (SoundType_e) SendDlgItemMessage(hWnd, IDC_SOUNDTYPE, CB_GETCURSEL, 0, 0);
// const uint32_t dwSpkrVolume = (uint32_t) SendDlgItemMessage(hWnd, IDC_SPKR_VOLUME, TBM_GETPOS, 0, 0);
// const uint32_t dwMBVolume = (uint32_t) SendDlgItemMessage(hWnd, IDC_MB_VOLUME, TBM_GETPOS, 0, 0);
// SpkrSetEmulationType(newSoundType);
// uint32_t dwSoundType = (soundtype == SOUND_NONE) ? REG_SOUNDTYPE_NONE : REG_SOUNDTYPE_WAVE;
uint32_t dwSoundType = REG_SOUNDTYPE_WAVE;
REGSAVE(REGVALUE_SOUND_EMULATION, dwSoundType);
@@ -235,22 +176,6 @@ void CPageSound::DlgOK(HWND hWnd)
m_PropertySheetHelper.PostMsgAfterClose(hWnd, m_Page);
}
#if 0
CPageSound::SOUNDCARDCHOICE CPageSound::CardTypeToComboItem(SS_CARDTYPE card)
{
switch (card)
{
case CT_MockingboardC: return SC_MOCKINGBOARD;
case CT_Phasor: return SC_PHASOR;
case CT_SAM: return SC_SAM;
case CT_Empty: return SC_EMPTY;
case CT_MegaAudio: return SC_MEGAAUDIO;
case CT_SDMusic: return SC_SDMUSIC;
default: _ASSERT(0); return SC_EMPTY;
}
}
#endif
CPageSound::AUXCARDCHOICE CPageSound::AuxCardTypeToComboItem(SS_CARDTYPE card)
{
switch (card)
@@ -275,39 +200,6 @@ int CPageSound::CardTypeToComboItem(UINT slot)
void CPageSound::InitOptions(HWND hWnd)
{
#if 0
const SS_CARDTYPE slot4 = m_PropertySheetHelper.GetConfigNew().m_Slot[SLOT4];
const SS_CARDTYPE slot5 = m_PropertySheetHelper.GetConfigNew().m_Slot[SLOT5];
bool isSlot4SoundCard = slot4 == CT_MockingboardC || slot4 == CT_Phasor || slot4 == CT_SAM || slot4 == CT_Empty;
bool isSlot5SoundCard = slot5 == CT_MockingboardC || slot5 == CT_Phasor || slot5 == CT_SAM || slot5 == CT_Empty;
bool isSlotXSoundCardEx = GetCardMgr().GetMockingboardCardMgr().GetEnableExtraCardTypes();
if (isSlotXSoundCardEx)
isSlot4SoundCard = isSlot5SoundCard = false;
if (isSlot4SoundCard)
m_PropertySheetHelper.FillComboBox(hWnd, IDC_SLOT4, m_soundCardChoices, (int)CardTypeToComboItem(slot4));
else if (isSlotXSoundCardEx)
m_PropertySheetHelper.FillComboBox(hWnd, IDC_SLOT4, m_soundCardChoicesEx, (int)CardTypeToComboItem(slot4));
else
m_PropertySheetHelper.FillComboBox(hWnd, IDC_SLOT4, m_soundCardChoice_Unavailable, 0);
if (isSlot5SoundCard)
m_PropertySheetHelper.FillComboBox(hWnd, IDC_SLOT5, m_soundCardChoices, (int)CardTypeToComboItem(slot5));
else if (isSlotXSoundCardEx)
m_PropertySheetHelper.FillComboBox(hWnd, IDC_SLOT5, m_soundCardChoicesEx, (int)CardTypeToComboItem(slot5));
else
m_PropertySheetHelper.FillComboBox(hWnd, IDC_SLOT5, m_soundCardChoice_Unavailable, 0);
bool enableMBVolume = slot4 == CT_MockingboardC || slot5 == CT_MockingboardC
|| slot4 == CT_Phasor || slot5 == CT_Phasor
|| slot4 == CT_MegaAudio || slot5 == CT_MegaAudio
|| slot4 == CT_SDMusic || slot5 == CT_SDMusic;
EnableWindow(GetDlgItem(hWnd, IDC_MB_VOLUME), enableMBVolume ? TRUE : FALSE);
#endif
SS_CARDTYPE currConfig[NUM_SLOTS];
for (UINT i = SLOT0; i < NUM_SLOTS; i++)
currConfig[i] = m_PropertySheetHelper.GetConfigNew().m_Slot[i];

View File

@@ -29,11 +29,9 @@ protected:
virtual void DlgCANCEL(HWND hWnd){}
private:
// enum SOUNDCARDCHOICE { SC_MOCKINGBOARD = 0, SC_PHASOR, SC_SAM, SC_EMPTY, SC_MEGAAUDIO, SC_SDMUSIC };
enum AUXCARDCHOICE { SC_80COL = 0, SC_EXT80COL, SC_RAMWORKS, SC_AUX_EMPTY };
void InitOptions(HWND hWnd);
// SOUNDCARDCHOICE CardTypeToComboItem(SS_CARDTYPE card);
AUXCARDCHOICE AuxCardTypeToComboItem(SS_CARDTYPE card);
int CardTypeToComboItem(UINT slot);
@@ -60,10 +58,6 @@ private:
static const UINT VOLUME_MIN = 0;
static const UINT VOLUME_MAX = 59;
static const char m_soundchoices[];
static const char m_soundCardChoices[];
static const char m_soundCardChoicesEx[];
static const char m_soundCardChoice_Unavailable[];
static const char m_auxChoices[];
static const char m_defaultDiskOptions[];