5 * Copyright (C) Robert Ham 2002, 2003 (node@users.sourceforge.net)
7 * Modification for MLT:
8 * Copyright (C) 2004 Ushodaya Enterprises Limited
9 * Author: Dan Dennedy <dan@dennedy.org>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #ifndef __JLH_PROCESS_H__
27 #define __JLH_PROCESS_H__
30 #include <jack/jack.h>
33 #include "lock_free_fifo.h"
35 typedef struct _process_info process_info_t
;
37 /** this is what gets passed to the process() callback and contains all
38 the data the process callback will need */
39 struct _process_info
{
41 /** the plugin instance chain */
42 struct _plugin
* chain
;
43 struct _plugin
* chain_end
;
45 jack_client_t
* jack_client
;
46 unsigned long port_count
;
47 jack_port_t
** jack_input_ports
;
48 jack_port_t
** jack_output_ports
;
50 unsigned long channels
;
51 LADSPA_Data
** jack_input_buffers
;
52 LADSPA_Data
** jack_output_buffers
;
53 LADSPA_Data
* silent_buffer
;
55 char * jack_client_name
;
59 extern jack_nframes_t sample_rate
;
60 extern jack_nframes_t buffer_size
;
62 process_info_t
* process_info_new (const char * client_name
,
63 unsigned long rack_channels
, gboolean connect_inputs
, gboolean connect_outputs
);
64 void process_info_destroy (process_info_t
* procinfo
);
66 void process_info_set_channels (process_info_t
* procinfo
,
67 unsigned long channels
, gboolean connect_inputs
, gboolean connect_outputs
);
69 int process_ladspa (process_info_t
* procinfo
, jack_nframes_t frames
,
70 LADSPA_Data
** inputs
, LADSPA_Data
** outputs
);
72 int process_jack (jack_nframes_t frames
, void * data
);
74 void process_quit (process_info_t
* procinfo
);
76 #endif /* __JLH_PROCESS_H__ */