mirror of
https://github.com/dwhinham/mt32-pi.git
synced 2026-10-27 06:21:59 +00:00
Fall back on working synth when preferred unavail
This commit is contained in:
1 parent
dc77ecc790
commit
f1b8f28ede
2 files changed
+15
-2
No files matched your search
@@ -16,6 +16,9 @@
|
||||
|
||||
# Set the default synthesizer to be made active on startup.
|
||||
#
|
||||
# If the default synthesizer is unavilable (e.g. missing ROMs or SoundFonts),
|
||||
# the first working synth is made active.
|
||||
#
|
||||
# Values: mt32*, soundfont
|
||||
#
|
||||
# mt32: Use mt32emu (Munt) for Roland MT-32 emulation
|
||||
|
||||
+12
-2
@@ -161,8 +161,18 @@ bool CMT32Pi::Initialize(bool bSerialMIDIEnabled)
|
||||
if (!m_pCurrentSynth)
|
||||
{
|
||||
logger.Write(MT32PiName, LogError, "Preferred synth failed to initialize successfully");
|
||||
LCDLog(TLCDLogType::Startup, "Synth init failed!");
|
||||
return false;
|
||||
|
||||
// Activate any working synth
|
||||
if (m_pMT32Synth)
|
||||
m_pCurrentSynth = m_pMT32Synth;
|
||||
else if (m_pSoundFontSynth)
|
||||
m_pCurrentSynth = m_pSoundFontSynth;
|
||||
else
|
||||
{
|
||||
logger.Write(MT32PiName, LogError, "No synths available");
|
||||
LCDLog(TLCDLogType::Startup, "Synth init failed!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
CUSBMIDIDevice* pMIDIDevice = static_cast<CUSBMIDIDevice*>(CDeviceNameService::Get()->GetDevice("umidi1", FALSE));
|
||||
|
||||
Reference in new issue
Block a user