BASS.NET API for the Un4seen BASS Audio Library

BassMidiBASS_MIDI_StreamGetFonts Method (Int32, BASS_MIDI_FONTEX, 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: 2.4.17.5
Syntax

public static int BASS_MIDI_StreamGetFonts(
	int handle,
	BASS_MIDI_FONTEX[] fonts,
	int count
)

Parameters

handle
Type: SystemInt32
The MIDI stream to retrieve the soundfont configuration of... 0 = get default soundfont configuration.
fonts
Type: Un4seen.Bass.AddOn.MidiBASS_MIDI_FONTEX
An array to retrieve the soundfont configuration.
count
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.
Remarks

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.

Examples

int fontCount = BassMidi.BASS_MIDI_StreamGetFontsCount(_stream);
BASS_MIDI_FONTEX[] fonts = new BASS_MIDI_FONTEX[fontCount];
int count = BassMidi.BASS_MIDI_StreamGetFonts(_stream, fonts, fontCount);
See Also

Reference