BASS_MIDI_StreamSetFilter
Sets an event filtering function on a MIDI stream.
BOOL BASS_MIDI_StreamSetFilter( HSTREAM handle, BOOL seeking, MIDIFILTERPROC *proc, void *user );
Parameters
handle | The MIDI stream handle. |
seeking | Also filter events when seeking? |
proc | The callback function... NULL = no filtering. |
user | User instance data to pass to the callback function. |
Return value
If successful, TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.Error codes
BASS_ERROR_HANDLE | handle is not valid. |
BASS_ERROR_NOTAVAIL | The stream does not have an event sequence. |
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 or BASS_MIDI_StreamEvents.