User defined callback function to receive MIDI data.
void CALLBACK MidiInProc(
DWORD device,
double time,
const BYTE *buffer,
DWORD length,
void *user
);
| device | The MIDI input device that the data is from. |
| time | Timestamp, in seconds since BASS_MIDI_InStart was called. |
| buffer | Pointer to the MIDI data. |
| length | The amount of data in bytes. |
| user | The user instance data given when BASS_MIDI_InInit was called. |
stream = BASS_MIDI_StreamCreate(16, 0, 0); // create a MIDI stream to play the MIDI data
...
void CALLBACK MidiInProc(DWORD device, double time, const BYTE *buffer, DWORD length, void *user)
{
BASS_MIDI_StreamEvents(stream, BASS_MIDI_EVENTS_RAW, buffer, length); // forward the data to the MIDI stream
}