BASS_MIDI_StreamGetFonts

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

DWORD BASS_MIDI_StreamGetFonts(
    HSTREAM handle,
    void *fonts,
    DWORD count
);

Parameters

handleThe MIDI stream to retrieve the soundfont configuration of... 0 = get default soundfont configuration.
fontsAn array of BASS_MIDI_FONT or BASS_MIDI_FONTEX or BASS_MIDI_FONTEX2 to retrieve the soundfont configuration.
countThe maximum number of elements to retrieve in the fonts array. The BASS_MIDI_FONT_EX or BASS_MIDI_FONT_EX2 flag may also be used to specify that fonts is an array of BASS_MIDI_FONTEX or BASS_MIDI_FONTEX2 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.

Remarks

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

Platform-specific

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

See also

BASS_MIDI_StreamCreateFile, BASS_MIDI_StreamSetFonts, BASS_MIDI_FONT structure, BASS_MIDI_FONTEX2 structure