Allocate space for an event to be written to an event port buffer.
Clients are to write the actual event data to be written starting at the
pointer returned by this function. Clients must not write more than
@a data_size bytes into this buffer. Clients must write normalised
MIDI data to the port - no running status and no (1-byte) realtime
messages interspersed with other messages (realtime messages are fine
when they occur on their own, like other messages).
Events must be written in order, sorted by their sample offsets.
JACK will not sort the events for you, and will refuse to store
out-of-order events.
@param port_buffer Buffer to write event to.
@param time Sample offset of event.
@param data_size Length of event's raw data in bytes.
@return Pointer to the beginning of the reserved event's data buffer, or
NULL on error (ie not enough space).
Allocate space for an event to be written to an event port buffer.
Clients are to write the actual event data to be written starting at the pointer returned by this function. Clients must not write more than @a data_size bytes into this buffer. Clients must write normalised MIDI data to the port - no running status and no (1-byte) realtime messages interspersed with other messages (realtime messages are fine when they occur on their own, like other messages).
Events must be written in order, sorted by their sample offsets. JACK will not sort the events for you, and will refuse to store out-of-order events.
@param port_buffer Buffer to write event to. @param time Sample offset of event. @param data_size Length of event's raw data in bytes. @return Pointer to the beginning of the reserved event's data buffer, or NULL on error (ie not enough space).