BASS.NET API for the Un4seen BASS Audio Library

BassMidiBASS_MIDI_StreamSetFilter Method

BASS.NET API for the Un4seen BASS Audio Library
Sets an event filtering function on a MIDI stream.

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

[DllImportAttribute("bassmidi")]
public static bool BASS_MIDI_StreamSetFilter(
	int handle,
	bool seeking,
	MIDIFILTERPROC proc,
	IntPtr user
)

Parameters

handle
Type: SystemInt32
The MIDI stream handle.
seeking
Type: SystemBoolean
Also filter events when seeking?
proc
Type: Un4seen.Bass.AddOn.MidiMIDIFILTERPROC
The callback function... = no filtering.
user
Type: SystemIntPtr
User instance data to pass to the callback function.

Return Value

Type: Boolean
If successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks

This function allows a MIDI stream to have its events modified during playback via a callback function. The callback function will be called before an event is processed, and it can choose to keep the event as is, or it can modify or drop the event. The filtering can also be applied to events while seeking, so that playback begins in a filtered state after seeking.

Filtering only applies to a MIDI stream's defined event sequence, not any events that are applied via BASS_MIDI_StreamEvent(Int32, Int32, BASSMIDIEvent, Int32) or BASS_MIDI_StreamEvents(Int32, BASSMIDIEventMode, BASS_MIDI_EVENT, Int32).

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not valid.
BASS_ERROR_NOTAVAILThe stream does not have an event sequence.

See Also

Reference