BASS_CONFIG_MIDI_COMPACT config option

Automatically compact all soundfonts following a configuration change?

BASS_SetConfig(
    BASS_CONFIG_MIDI_COMPACT,
    BOOL compact
);

Parameters

compactIf TRUE, all soundfonts are compacted following a MIDI stream being freed, or a BASS_MIDI_StreamSetFonts call.

Remarks

The compacting is not performed immediately upon a MIDI stream being freed or BASS_MIDI_StreamSetFonts being called, but rather 2 seconds later (in another thread), so that if another MIDI stream immediately starts using the soundfonts, they are not needlessly closed and reopened.

Samples that have been preloaded by BASS_MIDI_FontLoad or BASS_MIDI_FontLoadEx are not affected by automatic compacting. Other samples that have been preloaded by BASS_MIDI_StreamLoadSamples are affected though, so it is probably wise to disable this option when using that function.

By default, this option is enabled.

See also

BASS_MIDI_FontCompact

BASS_GetConfig, BASS_SetConfig