Retrieves a portion of the events in a MIDI stream.
Namespace: Un4seen.Bass.AddOn.Midi
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
[DllImportAttribute("bassmidi", EntryPoint = "BASS_MIDI_StreamGetEventsEx", CharSet = CharSet.Unicode)] public static int BASS_MIDI_StreamGetEvents( int handle, int track, BASSMIDIEvent filter, BASS_MIDI_EVENT[] events, int start, int count )
Parameters
- handle
- Type: SystemInt32
The MIDI stream to get the events from. - track
- Type: SystemInt32
The track to get the events from... 0 = 1st track. - filter
- Type: Un4seen.Bass.AddOn.MidiBASSMIDIEvent
The type of event to retrieve (use MIDI_EVENT_NONE to retrieve all events). See BASSMIDIEvent for a list of possible event types. - events
- Type: Un4seen.Bass.AddOn.MidiBASS_MIDI_EVENT
The pointer to an array of BASS_MIDI_EVENT to retrieve the events ( = get the number of events without getting the events themselves). - start
- Type: SystemInt32
The first event to retrieve. - count
- Type: SystemInt32
The maximum number of events to retrieve.
Return Value
Type: Int32If successful, the number of events is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
ERROR CODE | Description |
---|---|
BASS_ERROR_HANDLE | handle is not valid. |
BASS_ERROR_NOTAVAIL | The stream is for real-time events only, so does not have an event sequence. |
BASS_ERROR_ILLPARAM | track is not valid. |
Examples
BASS_MIDI_EVENT[] events = new BASS_MIDI_EVENT[10]; int count = BassMidi.BASS_MIDI_StreamGetEvents(_stream, 0, BASSMIDIEvent.MIDI_EVENT_NONE, events, 0, 10);
See Also