Retrieves the soundfont configuration of a MIDI stream, or the default soundfont configuration.

    HSTREAM handle,
    void *fonts,
    DWORD count


handleThe MIDI stream to retrieve the soundfont configuration of... 0 = get default soundfont configuration.
fontsAn array of BASS_MIDI_FONT or BASS_MIDI_FONTEX to retrieve the soundfont configuration.
countThe maximum number of elements to retrieve in the fonts array. The BASS_MIDI_FONT_EX flag may also be used to specify that fonts is an array of BASS_MIDI_FONTEX rather than BASS_MIDI_FONT. This and fonts can be 0, to get the number of elements in the soundfont configuration.

Return value

If successful, the number of soundfonts in the configuration (which can be higher than count) is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.

Error codes

BASS_ERROR_HANDLEhandle is not valid.


When a soundfont matching the MIDI file is loaded, it will be the first element in the returned configuration.


Depending on the programming language used, the BASS_MIDI_FONT_EX flag may be automatically applied when the BASS_MIDI_FONTEX structure is used, through overloading in the BASSMIDI header. That is true for C++ and Delphi.

See also

BASS_MIDI_StreamCreateFile, BASS_MIDI_StreamSetFonts, BASS_MIDI_FONT structure, BASS_MIDI_FONTEX structure