BASS.NET API for the Un4seen BASS Audio LibraryBassMidiBASS_MIDI_StreamGetFonts Method (Int32, BASS_MIDI_FONT, Int32)BASS.NET API for the Un4seen BASS Audio Library
Retrieves the soundfont configuration of a MIDI stream, or the default soundfont configuration.

Namespace: Un4seen.Bass.AddOn.Midi
Assembly: Bass.Net (in Bass.Net.dll) Version:

[DllImportAttribute("bassmidi.dll", CharSet = CharSet.Unicode)]
public static int BASS_MIDI_StreamGetFonts(
	int handle,
	BASS_MIDI_FONT[] fonts,
	int count


Type: SystemInt32
The MIDI stream to retrieve the soundfont configuration of... 0 = get default soundfont configuration.
Type: Un4seen.Bass.AddOn.MidiBASS_MIDI_FONT
An array to retrieve the soundfont configuration.
Type: SystemInt32
The maximum number of elements to retrieve in the fonts array. This and fonts can be 0, to get the number of elements in the soundfont configuration.

Return Value

Type: Int32
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.

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

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not valid.


Dim fontCount As Integer = BassMidi.BASS_MIDI_StreamGetFontsCount(_stream)
Dim fonts(fontCount) As BASS_MIDI_FONT
Dim count As Integer = BassMidi.BASS_MIDI_StreamGetFonts(_stream, fonts, fontCount)
int fontCount = BassMidi.BASS_MIDI_StreamGetFontsCount(_stream);
BASS_MIDI_FONT[] fonts = new BASS_MIDI_FONT[fontCount];
int count = BassMidi.BASS_MIDI_StreamGetFonts(_stream, fonts, fontCount);
See Also