SoundFont handling

Started by gicci,

gicci

I need to implement the switching among different SoundFont configurations when changing MIDI files.
It would be better to keep all the SoundFonts open just unloading the samples when they are not needed or open/close them as needed? Is there a limit on the open SoundFonts?

Ian @ un4seen

By default, BASSMIDI will automatically unload unused samples when freeing a MIDI stream (and in BASS_MIDI_StreamSetFonts), so you can keep the soundfonts open without wasting memory. See the BASS_CONFIG_MIDI_COMPACT documentation for details. You can also monitor the memory usage with the BASS_CONFIG_MIDI_SAMPLEMEM option.

The number of open soundfonts is unlimited (apart from available memory).