Jack2: midiport.h Source File

Jack2 1.9.21

midiport.h
1/*
2 Copyright (C) 2004 Ian Esten
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2.1 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18*/
19
20
21#ifndef __JACK_MIDIPORT_H
22#define __JACK_MIDIPORT_H
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#include <jack/weakmacros.h>
29#include <jack/types.h>
30#include <stdlib.h>
31
32
34typedef unsigned char jack_midi_data_t;
35
36
38 typedef struct _jack_midi_event
39{
40 jack_nframes_t time;
41 size_t size;
42 jack_midi_data_t *buffer;
43} jack_midi_event_t;
44
45
56uint32_t
57jack_midi_get_event_count(void* port_buffer) JACK_OPTIONAL_WEAK_EXPORT;
58
59
82int
83jack_midi_event_get(jack_midi_event_t *event,
84 void *port_buffer,
85 uint32_t event_index) JACK_OPTIONAL_WEAK_EXPORT;
86
87
96void
97jack_midi_clear_buffer(void *port_buffer) JACK_OPTIONAL_WEAK_EXPORT;
98
109void
110jack_midi_reset_buffer(void *port_buffer) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
111
112
120size_t
121jack_midi_max_event_size(void* port_buffer) JACK_OPTIONAL_WEAK_EXPORT;
122
123
143jack_midi_data_t*
144jack_midi_event_reserve(void *port_buffer,
145 jack_nframes_t time,
146 size_t data_size) JACK_OPTIONAL_WEAK_EXPORT;
147
148
170int
171jack_midi_event_write(void *port_buffer,
172 jack_nframes_t time,
173 const jack_midi_data_t *data,
174 size_t data_size) JACK_OPTIONAL_WEAK_EXPORT;
175
176
185uint32_t
186jack_midi_get_lost_event_count(void *port_buffer) JACK_OPTIONAL_WEAK_EXPORT;
187
190#ifdef __cplusplus
191}
192#endif
193
194
195#endif /* __JACK_MIDIPORT_H */
196
197
jack_midi_get_event_count
uint32_t jack_midi_get_event_count(void *port_buffer) JACK_OPTIONAL_WEAK_EXPORT
jack_midi_get_lost_event_count
uint32_t jack_midi_get_lost_event_count(void *port_buffer) JACK_OPTIONAL_WEAK_EXPORT
jack_midi_event_reserve
jack_midi_data_t * jack_midi_event_reserve(void *port_buffer, jack_nframes_t time, size_t data_size) JACK_OPTIONAL_WEAK_EXPORT
jack_midi_reset_buffer
void jack_midi_reset_buffer(void *port_buffer) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
jack_midi_clear_buffer
void jack_midi_clear_buffer(void *port_buffer) JACK_OPTIONAL_WEAK_EXPORT
jack_midi_event_get
int jack_midi_event_get(jack_midi_event_t *event, void *port_buffer, uint32_t event_index) JACK_OPTIONAL_WEAK_EXPORT
jack_midi_event_write
int jack_midi_event_write(void *port_buffer, jack_nframes_t time, const jack_midi_data_t *data, size_t data_size) JACK_OPTIONAL_WEAK_EXPORT
jack_midi_max_event_size
size_t jack_midi_max_event_size(void *port_buffer) JACK_OPTIONAL_WEAK_EXPORT
_jack_midi_event
Definition: midiport.h:39
_jack_midi_event::time
jack_nframes_t time
Definition: midiport.h:40
_jack_midi_event::size
size_t size
Definition: midiport.h:41
_jack_midi_event::buffer
jack_midi_data_t * buffer
Definition: midiport.h:42