Allocates a buffer into memory and fills it with the MIDI representation of the piece which is currently loaded.
- GPMID_ENTRY int GPMID_CreateMidiBuffer(
- void** aBuffer,
- unsigned int* aSize
A pointer to the buffer containing MIDI data: pass a pointer to the variable that will receive it.
The size of the buffer: pass a pointer to the variable that will receive it.
Zero on failure, non-zero otherwise.
The content of the buffer returned is what would be read into a regular MIDI file. As such, it is suitable for playback by any audio framework supporting MIDI playback from memory, or written down to a .mid file for further playing.
When the buffer is not needed anymore, to free the memory it uses, use GPMID_DestroyMidiBuffer.