BASS_MIDI_StreamGetEventsEx
Retrieves a portion of the events in a MIDI stream.
DWORD BASS_MIDI_StreamGetEventsEx(
HSTREAM handle,
int track,
DWORD filter,
BASS_MIDI_EVENT *events,
DWORD start,
DWORD count
);
Parameters
handle | The MIDI stream to get the events from.
|
track | The track to get the events from... 0 = 1st track, -1 = all tracks.
|
filter | The type of events to retrieve... 0 = all events. See BASS_MIDI_StreamEvent for a list of possible event types. |
|
events | Pointer to an array to receive the events... NULL = get the number of events available in the specified range without getting the events themselves.
|
start | The first event to retrieve.
|
count | The maximum number of events to retrieve.
|
Return value
If successful, the number of events is returned, else -1 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.
|
BASS_ERROR_ILLPARAM | track is not valid.
|
Remarks
This function is identical to
BASS_MIDI_StreamGetEvents except that it can retrieve a portion of the events instead of all of them.
Example
Retrieve the first 10 events in the 1st track.
BASS_MIDI_EVENT events[10]; // event array
DWORD eventc=BASS_MIDI_StreamGetEvents(handle, 0, 0, events, 0, 10); // get the events
See also
BASS_MIDI_StreamCreateFile,
BASS_MIDI_StreamGetEvent,
BASS_MIDI_StreamGetEvents,
BASS_MIDI_EVENT structure