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
handle | The MIDI stream to retrieve the soundfont configuration of... 0 = get default soundfont configuration.
|
fonts | An array of BASS_MIDI_FONT or BASS_MIDI_FONTEX to retrieve the soundfont configuration.
|
count | The 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_HANDLE | handle 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 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