00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __JACK_MIDIPORT_H
00022 #define __JACK_MIDIPORT_H
00023
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027
00028 #include <jack/types.h>
00029 #include <stdlib.h>
00030
00031
00033 typedef unsigned char jack_midi_data_t;
00034
00035
00037 typedef struct _jack_midi_event
00038 {
00039 jack_nframes_t time;
00040 size_t size;
00041 jack_midi_data_t *buffer;
00042 } jack_midi_event_t;
00043
00044
00046 typedef struct _jack_midi_port_info
00047 {
00048 jack_nframes_t event_count;
00049 } jack_midi_port_info_t;
00050
00051
00059 void
00060 jack_midi_reset_new_port(void *port_buffer,
00061 jack_nframes_t nframes);
00062
00063
00064
00065
00066
00067
00068
00069
00070 jack_midi_port_info_t*
00071 jack_midi_port_get_info(void* port_buffer,
00072 jack_nframes_t nframes);
00073
00074
00087 int
00088 jack_midi_event_get(jack_midi_event_t *event,
00089 void *port_buffer,
00090 jack_nframes_t event_index,
00091 jack_nframes_t nframes);
00092
00093
00103 void
00104 jack_midi_clear_buffer(void *port_buffer,
00105 jack_nframes_t nframes);
00106
00107
00116 size_t
00117 jack_midi_max_event_size(void* port_buffer, jack_nframes_t nframes);
00118
00119
00136 jack_midi_data_t*
00137 jack_midi_event_reserve(void *port_buffer,
00138 jack_nframes_t time,
00139 size_t data_size,
00140 jack_nframes_t nframes);
00141
00142
00156 int
00157 jack_midi_event_write(void *port_buffer,
00158 jack_nframes_t time,
00159 const jack_midi_data_t *data,
00160 size_t data_size,
00161 jack_nframes_t nframes);
00162
00163
00173 jack_nframes_t
00174 jack_midi_get_lost_event_count(void *port_buffer,
00175 jack_nframes_t nframes);
00176
00177
00178 #ifdef __cplusplus
00179 }
00180 #endif
00181
00182
00183 #endif
00184
00185