- WildMidi now uses the soundfont manager.

- added the missing handler for reading Timidity configs from the lump directory.
- fixed incomplete init of the GUS synth when no soundfont can be located.
- fixed bad initialization of WildMidi sampling frequency. It would default to 11.025 kHz if no valid rate was set. Now it will use the sound device's native frequency.
This commit is contained in:
Christoph Oelckers 2018-02-22 22:35:49 +01:00
commit c12c068355
7 changed files with 185 additions and 65 deletions

View file

@ -664,6 +664,7 @@ int LoadDMXGUS()
readbuffer[i-1] = 0;
}
/* Some functions get aggravated if not even the standard banks are available. */
if (tonebank[0] == NULL)
{
tonebank[0] = new ToneBank;
@ -697,12 +698,25 @@ void FreeDLS(DLS_Data *data);
Renderer::Renderer(float sample_rate, const char *args)
{
// Load explicitly stated sound font if so desired.
if (args != nullptr)
if (args != nullptr && *args != 0)
{
if (!stricmp(args, "DMXGUS")) LoadDMXGUS();
LoadConfig(args);
int ret;
FreeAll();
if (!stricmp(args, "DMXGUS")) ret = LoadDMXGUS();
ret = LoadConfig(args);
if (ret != 0)
{
}
}
//
if (tonebank[0] == NULL)
{
tonebank[0] = new ToneBank;
drumset[0] = new ToneBank;
}
rate = sample_rate;
patches = NULL;
resample_buffer_size = 0;