Jack2: alsa_midi_impl.h Source File

Jack2 1.9.12

alsa_midi_impl.h
1 /*
2 * Copyright (c) 2007 Dmitry S. Baikov
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 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 General Public License for more details.
13 *
14 * You should have received a copy of the GNU 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 #ifndef __jack_alsa_midi_impl_h__
20 #define __jack_alsa_midi_impl_h__
21
22 #include "JackConstants.h"
23
24 #ifdef JACKMP
25
26 #include "types.h"
27
28 #ifdef __cplusplus
29 extern "C"
30 {
31 #endif
32
33 int JACK_is_realtime(jack_client_t *client);
34 int JACK_client_create_thread(jack_client_t *client, pthread_t *thread, int priority, int realtime, void *(*start_routine)(void*), void *arg);
35
36 jack_port_t* JACK_port_register(jack_client_t *client, const char *port_name, const char *port_type, unsigned long flags, unsigned long buffer_size);
37 int JACK_port_unregister(jack_client_t *, jack_port_t*);
38 void* JACK_port_get_buffer(jack_port_t*, jack_nframes_t);
39 int JACK_port_set_alias(jack_port_t* port, const char* name);
40
41 jack_nframes_t JACK_get_sample_rate(jack_client_t *);
42 jack_nframes_t JACK_frame_time(jack_client_t *);
43 jack_nframes_t JACK_last_frame_time(jack_client_t *);
44
45 #define jack_is_realtime JACK_is_realtime
46 #define jack_client_create_thread JACK_client_create_thread
47
48 #define jack_port_register JACK_port_register
49 #define jack_port_unregister JACK_port_unregister
50 #define jack_port_get_buffer JACK_port_get_buffer
51 #define jack_port_set_alias JACK_port_set_alias
52
53 #define jack_get_sample_rate JACK_get_sample_rate
54 #define jack_frame_time JACK_frame_time
55 #define jack_last_frame_time JACK_last_frame_time
56
57 #ifdef __cplusplus
58 } // extern "C"
59 #endif
60
61 #else // usual jack
62
63 #include "jack.h"
64 #include "thread.h"
65
66 #endif
67
68 #if defined(STANDALONE)
69 #define MESSAGE(...) fprintf(stderr, __VA_ARGS__)
70 #elif !defined(JACKMP)
71 #include <jack/messagebuffer.h>
72 #endif
73
74 #define info_log(...) jack_info(__VA_ARGS__)
75 #define error_log(...) jack_error(__VA_ARGS__)
76
77 #ifdef ALSA_MIDI_DEBUG
78 #define debug_log(...) jack_info(__VA_ARGS__)
79 #else
80 #define debug_log(...)
81 #endif
82
83 #include "alsa_midi.h"
84
85 #endif /* __jack_alsa_midi_impl_h__ */
thread.h