2 terminatorX - realtime audio scratching software
3 Copyright (C) 1999-2003 Alexander König
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 Description: Header to tX_vttfx.cc - see there for more info
29 #include "tX_seqpar.h"
30 #include "tX_ladspa.h"
36 /* Ids to guarantee positioning of builtin */
37 #define TX_FX_BUILTINCUTOFF 1
38 #define TX_FX_BUILTINECHO 2
39 #define TX_FX_LADSPA 3
41 #include <libxml/xmlmemory.h>
42 #include <libxml/parser.h>
44 /* abstract super class vtt_fx */
50 GtkWidget *panel_widget;
54 vtt_fx() { vtt=NULL; }
56 void set_vtt(void *v) { vtt=v;}
57 void *get_vtt() { return vtt; }
59 virtual void activate()=NULL;
60 virtual void deactivate()=NULL;
61 virtual void run()=NULL;
62 virtual int isEnabled()=NULL;
63 virtual void reconnect_buffer();
65 virtual const char *get_info_string()=NULL;
67 virtual void save(FILE *rc, gzFile rz, char *indent)=NULL;
69 GtkWidget* get_panel_widget() { return panel_widget; }
70 void set_panel_widget(GtkWidget *widget) { panel_widget=widget; }
72 void set_panel(tX_panel *p) { panel = p; }
73 tX_panel* get_panel() { return panel; }
76 /*********************************/
80 class vtt_fx_lp : public vtt_fx
83 virtual void activate();
84 virtual void deactivate();
86 virtual int isEnabled();
88 virtual void save(FILE *rc, gzFile rz, char *indent);
89 virtual const char *get_info_string();
93 class vtt_fx_ec : public vtt_fx
96 virtual void activate();
97 virtual void deactivate();
99 virtual int isEnabled();
101 virtual void save(FILE *rc, gzFile rz, char *indent);
102 virtual const char *get_info_string();
105 /********************************/
106 /* LADSPA plugin fx */
108 class vtt_fx_ladspa : public vtt_fx
111 list <tX_seqpar_vttfx *> controls;
113 tX_seqpar_vttfx *sp_enable;
114 tX_seqpar_vttfx *sp_outgain;
115 int input_port, output_port;
116 LADSPA_Handle *instance;
117 LADSPA_Plugin *plugin;
120 vtt_fx_ladspa(LADSPA_Plugin *, void *);
121 virtual ~vtt_fx_ladspa();
124 virtual void activate();
125 virtual void deactivate();
127 virtual int isEnabled();
128 virtual void reconnect_buffer();
129 virtual const char *get_info_string();
130 virtual void save(FILE *rc, gzFile rz, char *indent);
131 #ifdef ENABLE_TX_LEGACY
132 virtual void load(FILE *);
134 virtual void load(xmlDocPtr, xmlNodePtr);