Commit be610143 authored by Monty Montgomery's avatar Monty Montgomery

Finish moving Deverb entirely to per-channel; remove from Master panel

Add 'Output' config entry to Master panel; nothing behind it yet though



git-svn-id: https://svn.xiph.org/trunk/postfish@6587 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent a4611361
......@@ -529,14 +529,19 @@ static void mainpanel_masterentry(postfish_mainpanel *p,
GtkWidget *, GtkWidget *)){
GtkWidget *ww=windowbutton_new(label);
GtkWidget *wa=gtk_toggle_button_new_with_label(shortcut);
GtkWidget *wa=(shortcut?
gtk_toggle_button_new_with_label(shortcut):
gtk_frame_new(shortcut));
gtk_table_attach_defaults(GTK_TABLE(table),ww,0,1,i+1,i+2);
gtk_table_attach_defaults(GTK_TABLE(table),wa,1,2,i+1,i+2);
if(shortcut)
gtk_widget_add_accelerator (wa, "activate", p->group, key, 0, 0);
else{
gtk_frame_set_shadow_type(GTK_FRAME(wa),GTK_SHADOW_ETCHED_IN);
}
gtk_widget_add_accelerator (wa, "activate", p->group, key, 0, 0);
if(panel_create)(*panel_create)(p,ww,wa);
if(panel_create)(*panel_create)(p,ww,(shortcut?wa:0));
}
#define CHANNEL_EFFECTS 7
......@@ -978,11 +983,11 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
mainpanel_masterentry(panel,mastertable,"_Crossmix "," c ",GDK_c,0,0);
mainpanel_masterentry(panel,mastertable,"_Multicomp "," m ",GDK_m,1,compandpanel_create_master);
mainpanel_masterentry(panel,mastertable,"_Onecomp "," o ",GDK_o,2,singlepanel_create);
mainpanel_masterentry(panel,mastertable,"De_verb "," v ",GDK_v,3,suppresspanel_create_master);
mainpanel_masterentry(panel,mastertable,"_Reverb "," r ",GDK_r,4,0);
mainpanel_masterentry(panel,mastertable,"_EQ "," e ",GDK_e,5,eqpanel_create);
mainpanel_masterentry(panel,mastertable,"_Limit "," l ",GDK_l,6,limitpanel_create);
mainpanel_masterentry(panel,mastertable,"_Singlecomp "," s ",GDK_s,2,singlepanel_create);
mainpanel_masterentry(panel,mastertable,"_Reverb "," r ",GDK_r,3,0);
mainpanel_masterentry(panel,mastertable,"_EQ "," e ",GDK_e,4,eqpanel_create);
mainpanel_masterentry(panel,mastertable,"_Limit "," l ",GDK_l,5,limitpanel_create);
mainpanel_masterentry(panel,mastertable,"_Output ",NULL,GDK_l,6,0);
g_signal_connect (G_OBJECT (panel->toplevel), "delete_event",
G_CALLBACK (shutdown), NULL);
......
......@@ -247,8 +247,6 @@ void *playback_thread(void *dummy){
result|=link->samples;
link=singlecomp_read(link);
result|=link->samples;
link=suppress_read_master(link);
result|=link->samples;
link=eq_read(link);
result|=link->samples;
......
......@@ -58,23 +58,17 @@ typedef struct {
} suppress_state;
suppress_settings suppress_master_set;
suppress_settings suppress_channel_set;
static suppress_state master_state;
static suppress_state channel_state;
static subband_window sw;
void suppress_reset(){
int i,j;
subband_reset(&master_state.ss);
subband_reset(&channel_state.ss);
for(i=0;i<suppress_freqs;i++){
for(j=0;j<input_ch;j++){
memset(&master_state.iirS[i][j],0,sizeof(iir_state));
memset(&master_state.iirT[i][j],0,sizeof(iir_state));
memset(&master_state.iirR[i][j],0,sizeof(iir_state));
memset(&channel_state.iirS[i][j],0,sizeof(iir_state));
memset(&channel_state.iirT[i][j],0,sizeof(iir_state));
memset(&channel_state.iirR[i][j],0,sizeof(iir_state));
......@@ -106,21 +100,14 @@ static void filter_set(subband_state *ss,
int suppress_load(void){
int i;
int qblocksize=input_size/16;
memset(&master_state,0,sizeof(master_state));
memset(&channel_state,0,sizeof(channel_state));
suppress_master_set.active=calloc(input_ch,sizeof(*suppress_master_set.active));
suppress_channel_set.active=calloc(input_ch,sizeof(*suppress_channel_set.active));
subband_load(&master_state.ss,suppress_freqs,qblocksize);
subband_load(&channel_state.ss,suppress_freqs,qblocksize);
subband_load_freqs(&master_state.ss,&sw,suppress_freq_list,suppress_freqs);
subband_load_freqs(&channel_state.ss,&sw,suppress_freq_list,suppress_freqs);
for(i=0;i<suppress_freqs;i++){
master_state.iirS[i]=calloc(input_ch,sizeof(iir_state));
master_state.iirT[i]=calloc(input_ch,sizeof(iir_state));
master_state.iirR[i]=calloc(input_ch,sizeof(iir_state));
channel_state.iirS[i]=calloc(input_ch,sizeof(iir_state));
channel_state.iirT[i]=calloc(input_ch,sizeof(iir_state));
channel_state.iirR[i]=calloc(input_ch,sizeof(iir_state));
......@@ -230,30 +217,10 @@ static void suppress_work_helper(void *vs, suppress_settings *sset){
}
}
static void suppress_work_master(void *vs){
suppress_work_helper(vs,&suppress_master_set);
}
static void suppress_work_channel(void *vs){
suppress_work_helper(vs,&suppress_channel_set);
}
time_linkage *suppress_read_master(time_linkage *in){
int visible[input_ch];
int active [input_ch];
subband_window *w[input_ch];
int i;
for(i=0;i<input_ch;i++){
visible[i]=0;
active[i]=suppress_master_set.active[0];
w[i]=&sw;
}
return subband_read(in, &master_state.ss, w, visible, active,
suppress_work_master, &master_state);
}
time_linkage *suppress_read_channel(time_linkage *in){
int visible[input_ch];
int active [input_ch];
......
......@@ -45,6 +45,5 @@ typedef struct {
extern void suppress_reset();
extern int suppress_load(void);
extern time_linkage *suppress_read_master(time_linkage *in);
extern time_linkage *suppress_read_channel(time_linkage *in);
......@@ -36,7 +36,6 @@ extern int input_ch;
extern int input_size;
extern int input_rate;
extern suppress_settings suppress_master_set;
extern suppress_settings suppress_channel_set;
typedef struct {
......@@ -61,7 +60,6 @@ typedef struct suppress_panel_state{
tbar bars[suppress_freqs+1];
} suppress_panel_state;
static suppress_panel_state *master_panel;
static suppress_panel_state *channel_panel;
static void compand_change(GtkWidget *w,gpointer in){
......@@ -255,21 +253,6 @@ static suppress_panel_state *suppresspanel_create_helper(postfish_mainpanel *mp,
return ps;
}
void suppresspanel_create_master(postfish_mainpanel *mp,
GtkWidget *windowbutton,
GtkWidget *activebutton){
char *shortcut[]={" v "};
subpanel_generic *panel=subpanel_create(mp,windowbutton,&activebutton,
&suppress_master_set.active[0],
&suppress_master_set.panel_visible,
"De_verberation filter (master)",shortcut,
0,1);
master_panel=suppresspanel_create_helper(mp,panel,&suppress_master_set);
}
void suppresspanel_create_channel(postfish_mainpanel *mp,
GtkWidget **windowbutton,
GtkWidget **activebutton){
......
......@@ -21,10 +21,6 @@
*
*/
extern void suppresspanel_create_master(postfish_mainpanel *mp,
GtkWidget *windowbutton,
GtkWidget *activebutton);
extern void suppresspanel_create_channel(postfish_mainpanel *mp,
GtkWidget **windowbutton,
GtkWidget **activebutton);
#define VERSION "$Id$ "
/* DO NOT EDIT: Automated versioning hack [Fri Apr 23 20:01:01 EDT 2004] */
/* DO NOT EDIT: Automated versioning hack [Fri Apr 23 20:18:58 EDT 2004] */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment