#include <string.h>
#include "lv2-miditype.h"
Go to the source code of this file.
Data Structures | |
struct | LV2_MIDIState |
This structure contains information about a MIDI port buffer, the current period size, and the position in the MIDI data buffer that we are currently reading from or writing to. More... | |
Functions | |
static double | lv2midi_get_event (LV2_MIDIState *state, double *timestamp, uint32_t *size, unsigned char **data) |
This function reads one event from the port associated with the state parameter and writes its timestamp, size and a pointer to its data bytes into the parameters timestamp , size and data , respectively. | |
static double | lv2midi_step (LV2_MIDIState *state) |
This function advances the read/write position in state to the next event and returns its timestamp, or the frame_count member of state is there are no more events. | |
static int | lv2midi_put_event (LV2_MIDIState *state, double timestamp, uint32_t size, const unsigned char *data) |
This function writes one MIDI event to the port buffer associated with state . |
static double lv2midi_get_event | ( | LV2_MIDIState * | state, | |
double * | timestamp, | |||
uint32_t * | size, | |||
unsigned char ** | data | |||
) | [static] |
This function reads one event from the port associated with the state
parameter and writes its timestamp, size and a pointer to its data bytes into the parameters timestamp
, size
and data
, respectively.
It does not advance the read position in the MIDI data buffer, two subsequent calls to lv2midi_get_event() will read the same event.
The function returns the timestamp for the read event, or the frame_count
member of state
if there are no more events in the buffer.
static int lv2midi_put_event | ( | LV2_MIDIState * | state, | |
double | timestamp, | |||
uint32_t | size, | |||
const unsigned char * | data | |||
) | [static] |
This function writes one MIDI event to the port buffer associated with state
.
It returns 0 when the event was written successfully to the buffer, and -1 when there was not enough room. The read/write position is advanced automatically.
static double lv2midi_step | ( | LV2_MIDIState * | state | ) | [static] |
This function advances the read/write position in state
to the next event and returns its timestamp, or the frame_count
member of state
is there are no more events.