- made the sound font loading a bit more error resistant.
- implemented a fallback both for sound font lookup and for MIDI device selection so that if some non-working combination is set up, the player will fall back to something that works.
This commit is contained in:
parent
d45a50b0db
commit
eb124f6160
10 changed files with 77 additions and 35 deletions
|
|
@ -720,15 +720,21 @@ void FreeDLS(DLS_Data *data);
|
|||
|
||||
Renderer::Renderer(float sample_rate, const char *args)
|
||||
{
|
||||
int res = 0;
|
||||
// Load explicitly stated sound font if so desired.
|
||||
if (args != nullptr && *args != 0)
|
||||
{
|
||||
if (!stricmp(args, "DMXGUS")) LoadDMXGUS();
|
||||
LoadConfig(args);
|
||||
if (!stricmp(args, "DMXGUS")) res = LoadDMXGUS();
|
||||
res = LoadConfig(args);
|
||||
}
|
||||
else if (tonebank[0] == nullptr)
|
||||
{
|
||||
LoadConfig();
|
||||
res = LoadConfig();
|
||||
}
|
||||
|
||||
if (res < 0)
|
||||
{
|
||||
I_Error("Failed to load any MIDI patches");
|
||||
}
|
||||
|
||||
// These can be left empty here if an error occured during sound font initialization.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue