4 * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net)
6 * This program 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 2 of the License, or
9 * (at your option) any later version.
11 * This program 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.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef __JLH_PROCESS_H__
22 #define __JLH_PROCESS_H__
25 #include <jack/jack.h>
28 #include "lock_free_fifo.h"
30 typedef struct _process_info process_info_t
;
32 /** this is what gets passed to the process() callback and contains all
33 the data the process callback will need */
34 struct _process_info
{
36 /** the plugin instance chain */
37 struct _plugin
* chain
;
38 struct _plugin
* chain_end
;
40 jack_client_t
* jack_client
;
41 unsigned long port_count
;
42 jack_port_t
** jack_input_ports
;
43 jack_port_t
** jack_output_ports
;
45 unsigned long channels
;
46 LADSPA_Data
** jack_input_buffers
;
47 LADSPA_Data
** jack_output_buffers
;
49 lff_t
* ui_to_process
;
50 lff_t
* process_to_ui
;
53 extern jack_nframes_t sample_rate
;
54 extern jack_nframes_t buffer_size
;
58 process_info_t
* process_info_new (struct _ui
* ui
, const char * client_name
,
59 unsigned long rack_channels
, gboolean connect_inputs
, gboolean connect_outputs
);
60 void process_info_destroy (process_info_t
* procinfo
);
62 void process_info_set_channels (process_info_t
* procinfo
, struct _ui
* ui
,
63 unsigned long channels
, gboolean connect_inputs
, gboolean connect_outputs
);
66 int process (jack_nframes_t frames
, void * data
);
69 #endif /* __JLH_PROCESS_H__ */