version/1.0
[ng-jackspa.git] / jackspa.h
bloba9cec301e13eb5b694ac1dc7baf492d92fb0aa9d
1 /* jackspa.h - API for LADSPA plugin instances with JACK audio ports
2 * Copyright © 2007 Nick Thomas
3 * Copyright © 2013 Géraud Meyer <graud@gmx.com>
5 * This file is part of ng-jackspa.
7 * ng-jackspa is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License version 2 as published by the
9 * Free Software Foundation.
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
16 * You should have received a copy of the GNU General Public License along
17 * with ng-jackspa. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef JACKSPA_H
21 #define JACKSPA_H
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
26 #include <jack/jack.h>
27 #include <ladspa.h>
28 #include <glib.h>
30 typedef struct {
31 char *client_name;
32 const char **port_names; /* indexed by the LADSPA port index */
33 jack_client_t *jack_client;
34 jack_port_t **jack_ports; /* indexed by the LADSPA port index */
35 unsigned long num_control_ports; /* input control ports */
36 unsigned long num_meter_ports; /* output control ports */
37 float *control_port_values; /* indexed by the LADSPA port index */
38 LADSPA_Handle handle;
39 LADSPA_Descriptor *descriptor;
40 void *library;
41 } state_t;
43 /* Initial config (command line switches) */
44 extern const GOptionEntry jackspa_entries[];
46 int jackspa_init(state_t *state, int argc, char **argv);
48 int jackspa_fini(state_t *state);
50 #ifdef __cplusplus
51 } /* extern "C" */
52 #endif
53 #endif