[96fb8ad] | 1 | /* |
---|
[466dff3] | 2 | Copyright (C) 2003-2013 Paul Brossier <piem@aubio.org> |
---|
[96fb8ad] | 3 | |
---|
[1274e9f] | 4 | This file is part of aubio. |
---|
[96fb8ad] | 5 | |
---|
[1274e9f] | 6 | aubio is free software: you can redistribute it and/or modify |
---|
| 7 | it under the terms of the GNU General Public License as published by |
---|
| 8 | the Free Software Foundation, either version 3 of the License, or |
---|
| 9 | (at your option) any later version. |
---|
[96fb8ad] | 10 | |
---|
[1274e9f] | 11 | aubio is distributed in the hope that it will be useful, |
---|
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 14 | GNU General Public License for more details. |
---|
| 15 | |
---|
| 16 | You should have received a copy of the GNU General Public License |
---|
| 17 | along with aubio. If not, see <http://www.gnu.org/licenses/>. |
---|
[96fb8ad] | 18 | |
---|
| 19 | */ |
---|
| 20 | |
---|
| 21 | #ifndef JACKIO_H |
---|
| 22 | #define JACKIO_H |
---|
| 23 | |
---|
[466dff3] | 24 | /** |
---|
[96fb8ad] | 25 | * @file |
---|
| 26 | * |
---|
| 27 | * Jack driver for aubio |
---|
[466dff3] | 28 | * |
---|
[96fb8ad] | 29 | */ |
---|
| 30 | |
---|
| 31 | #ifdef __cplusplus |
---|
[1274e9f] | 32 | extern "C" |
---|
| 33 | { |
---|
[96fb8ad] | 34 | #endif |
---|
| 35 | |
---|
[c201306] | 36 | #include <jack/jack.h> |
---|
| 37 | #include <jack/midiport.h> |
---|
| 38 | #include <jack/ringbuffer.h> |
---|
| 39 | |
---|
[96fb8ad] | 40 | /** jack object */ |
---|
| 41 | typedef struct _aubio_jack_t aubio_jack_t; |
---|
| 42 | /** jack process function */ |
---|
[466dff3] | 43 | typedef int (*aubio_process_func_t) (fvec_t * input, fvec_t * output); |
---|
[96fb8ad] | 44 | |
---|
| 45 | /** jack device creation function */ |
---|
[466dff3] | 46 | aubio_jack_t *new_aubio_jack (uint_t hop_size, |
---|
| 47 | uint_t inchannels, uint_t outchannels, |
---|
| 48 | uint_t imidichan, uint_t omidichan); |
---|
[96fb8ad] | 49 | /** activate jack client (run jackprocess function) */ |
---|
[466dff3] | 50 | uint_t aubio_jack_activate (aubio_jack_t * jack_setup, |
---|
| 51 | aubio_process_func_t callback); |
---|
[96fb8ad] | 52 | /** close and delete jack client */ |
---|
[1274e9f] | 53 | void aubio_jack_close (aubio_jack_t * jack_setup); |
---|
[466dff3] | 54 | void del_aubio_jack (aubio_jack_t * jack_setup); |
---|
| 55 | /** get samplerate */ |
---|
| 56 | uint_t aubio_jack_get_samplerate (aubio_jack_t * jack_setup); |
---|
[96fb8ad] | 57 | |
---|
[c201306] | 58 | /** write a jack_midi_event_t to the midi output ringbuffer */ |
---|
| 59 | void aubio_jack_midi_event_write (aubio_jack_t * jack_setup, |
---|
| 60 | jack_midi_event_t * event); |
---|
| 61 | |
---|
[96fb8ad] | 62 | #ifdef __cplusplus |
---|
| 63 | } |
---|
| 64 | #endif |
---|
| 65 | |
---|
[1274e9f] | 66 | #endif /* JACKIO_H */ |
---|