mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-02 19:29:27 +00:00
Config->Sound: improve UX for extra MB cards when cmd-line is empty
This commit is contained in:
parent
5ba153c244
commit
96a386a77a
@ -42,7 +42,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
bool MockingboardCardManager::IsMockingboard(UINT slot)
|
bool MockingboardCardManager::IsMockingboard(UINT slot)
|
||||||
{
|
{
|
||||||
SS_CARDTYPE type = GetCardMgr().QuerySlot(slot);
|
SS_CARDTYPE type = GetCardMgr().QuerySlot(slot);
|
||||||
return type == CT_MockingboardC || type == CT_Phasor || type == CT_MegaAudio || type == CT_SDMusic;
|
return type == CT_MockingboardC || type == CT_Phasor || IsMockingboardExtraCardType(slot);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MockingboardCardManager::IsMockingboardExtraCardType(UINT slot)
|
||||||
|
{
|
||||||
|
SS_CARDTYPE type = GetCardMgr().QuerySlot(slot);
|
||||||
|
return type == CT_MegaAudio || type == CT_SDMusic;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MockingboardCardManager::ReinitializeClock(void)
|
void MockingboardCardManager::ReinitializeClock(void)
|
||||||
@ -162,6 +168,20 @@ void MockingboardCardManager::SetVolume(DWORD volume, DWORD volumeMax)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MockingboardCardManager::GetEnableExtraCardTypes(void)
|
||||||
|
{
|
||||||
|
// Scan slots for any extra card types
|
||||||
|
// . eg. maybe started a new AppleWin (with empty cmd line), but with Registry's slot 4 = CT_MegaAudio
|
||||||
|
// Otherwise, Config->Sound will show slot as "Unavailable"
|
||||||
|
for (UINT i = SLOT0; i < NUM_SLOTS; i++)
|
||||||
|
{
|
||||||
|
if (IsMockingboardExtraCardType(i))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return m_enableExtraCardTypes;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
void MockingboardCardManager::CheckCumulativeCycles(void)
|
void MockingboardCardManager::CheckCumulativeCycles(void)
|
||||||
{
|
{
|
||||||
|
@ -33,7 +33,7 @@ public:
|
|||||||
void SetVolume(DWORD volume, DWORD volumeMax);
|
void SetVolume(DWORD volume, DWORD volumeMax);
|
||||||
void OutputToRiff(void) { m_outputToRiff = true; }
|
void OutputToRiff(void) { m_outputToRiff = true; }
|
||||||
void SetEnableExtraCardTypes(bool enable) { m_enableExtraCardTypes = enable; }
|
void SetEnableExtraCardTypes(bool enable) { m_enableExtraCardTypes = enable; }
|
||||||
bool GetEnableExtraCardTypes(void) { return m_enableExtraCardTypes; }
|
bool GetEnableExtraCardTypes(void);
|
||||||
|
|
||||||
void Destroy(void);
|
void Destroy(void);
|
||||||
void Reset(const bool powerCycle)
|
void Reset(const bool powerCycle)
|
||||||
@ -52,6 +52,7 @@ private:
|
|||||||
bool Init(void);
|
bool Init(void);
|
||||||
UINT GenerateAllSoundData(void);
|
UINT GenerateAllSoundData(void);
|
||||||
void MixAllAndCopyToRingBuffer(UINT nNumSamples);
|
void MixAllAndCopyToRingBuffer(UINT nNumSamples);
|
||||||
|
bool IsMockingboardExtraCardType(UINT slot);
|
||||||
|
|
||||||
static const unsigned short NUM_MB_CHANNELS = 2;
|
static const unsigned short NUM_MB_CHANNELS = 2;
|
||||||
static const DWORD SOUNDBUFFER_SIZE = MAX_SAMPLES * sizeof(short) * NUM_MB_CHANNELS;
|
static const DWORD SOUNDBUFFER_SIZE = MAX_SAMPLES * sizeof(short) * NUM_MB_CHANNELS;
|
||||||
|
Loading…
Reference in New Issue
Block a user