Jack2  1.9.13
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  int JACK_port_set_device_metadata(jack_port_t* port, const char* pretty_name);
41 
42  jack_nframes_t JACK_get_sample_rate(jack_client_t *);
43  jack_nframes_t JACK_frame_time(jack_client_t *);
44  jack_nframes_t JACK_last_frame_time(jack_client_t *);
45 
46 #define jack_is_realtime JACK_is_realtime
47 #define jack_client_create_thread JACK_client_create_thread
48 
49 #define jack_port_register JACK_port_register
50 #define jack_port_unregister JACK_port_unregister
51 #define jack_port_get_buffer JACK_port_get_buffer
52 #define jack_port_set_alias JACK_port_set_alias
53 #define jack_port_set_device_metadata JACK_port_set_device_metadata
54 
55 #define jack_get_sample_rate JACK_get_sample_rate
56 #define jack_frame_time JACK_frame_time
57 #define jack_last_frame_time JACK_last_frame_time
58 
59 #ifdef __cplusplus
60 } // extern "C"
61 #endif
62 
63 #else // usual jack
64 
65 #include "jack.h"
66 #include "thread.h"
67 
68 #endif
69 
70 #if defined(STANDALONE)
71 #define MESSAGE(...) fprintf(stderr, __VA_ARGS__)
72 #elif !defined(JACKMP)
73 #include <jack/messagebuffer.h>
74 #endif
75 
76 #define info_log(...) jack_info(__VA_ARGS__)
77 #define error_log(...) jack_error(__VA_ARGS__)
78 
79 #ifdef ALSA_MIDI_DEBUG
80 #define debug_log(...) jack_info(__VA_ARGS__)
81 #else
82 #define debug_log(...)
83 #endif
84 
85 #include "alsa_midi.h"
86 
87 #endif /* __jack_alsa_midi_impl_h__ */