Unknown
From BASS MIDI
BASS_MIDI_ConvertEvents
Converts raw MIDI data to BASS_MIDI_EVENT structures.
DWORD BASS_MIDI_ConvertEvents(
BYTE *data,
DWORD length
BASS_MIDI_EVENT *events,
DWORD count,
DWORD flags
);
Parameters
| data | The raw MIDI data. | ||||
| length | The length of the data. | ||||
| events | Pointer to an array to receive the events... NULL = get the number of events without getting the events themselves. | ||||
| count | The maximum number of events to convert. | ||||
| flags | A combination of these flags.
|
Return value
If successful, the number of events processed is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.Error codes
| BASS_ERROR_MEM | There is insufficient memory. |
| BASS_ERROR_UNKNOWN | Some mystery problem! |
Example
Convert some raw MIDI data.BYTE data[7]={0x90, 60, 100, 64, 100, 67, 100}; // the event data
BASS_MIDI_EVENTS events[3];
BASS_MIDI_ConvertEvents(data, 7, events, 3, 0); // convert the events
Convert the same data with delta-time info.
BYTE data[10]={0, 0x90, 60, 100, 0, 64, 100, 0, 67, 100}; // the event data
BASS_MIDI_EVENTS events[3];
BASS_MIDI_ConvertEvents(data, 10, events, 3, BASS_MIDI_EVENTS_TIME); // convert the events