Commit a9e4eb0f authored by Monty Montgomery's avatar Monty Montgomery

implement per-channel multicompand panel UIs

next: tie to engine infrastructure



git-svn-id: https://svn.xiph.org/trunk/postfish@6581 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent 728a74ee
......@@ -37,6 +37,7 @@ extern int input_size;
extern int input_rate;
extern multicompand_settings multi_master_set;
extern multicompand_settings *multi_channel_set;
typedef struct {
GtkWidget *label;
......@@ -490,9 +491,8 @@ static void mode_knee(GtkToggleButton *b,gpointer in){
}
static void compandpanel_create(postfish_mainpanel *mp,
multicompand_settings *ms,
GtkWidget *windowbutton,
GtkWidget *activebutton){
subpanel_generic *panel,
multicompand_settings *ms){
int i;
char *labels[14]={"130","120","110","100","90","80","70",
"60","50","40","30","20","10","0"};
......@@ -508,14 +508,6 @@ static void compandpanel_create(postfish_mainpanel *mp,
float per_levels[9]={0,12.5,25,37.5,50,62.5,75,87.5,100};
char *per_labels[8]={"","25%","","50%","","75%","","100%"};
char *shortcut[]={" m "};
subpanel_generic *panel=subpanel_create(mp,windowbutton,&activebutton,
&ms->panel_active,
&ms->panel_visible,
"_Multiband Compand",shortcut,
0,1);
multi_panel_state *ps=master_panel=calloc(1,sizeof(multi_panel_state));
ps->inactive_updatep=1;
ps->bank_active=2;
......@@ -945,8 +937,35 @@ static void compandpanel_create(postfish_mainpanel *mp,
void compandpanel_create_master(postfish_mainpanel *mp,
GtkWidget *windowbutton,
GtkWidget *activebutton){
char *shortcut[]={" m "};
subpanel_generic *panel=subpanel_create(mp,windowbutton,&activebutton,
&multi_master_set.panel_active,
&multi_master_set.panel_visible,
"_Multiband Compand (master)",shortcut,
0,1);
compandpanel_create(mp,panel,&multi_master_set);
}
void compandpanel_create_channel(postfish_mainpanel *mp,
GtkWidget **windowbutton,
GtkWidget **activebutton){
int i;
compandpanel_create(mp,&multi_master_set,windowbutton,activebutton);
/* a panel for each channel */
for(i=0;i<input_ch;i++){
subpanel_generic *panel;
char buffer[80];
sprintf(buffer,"_Multiband Compand (channel %d)",i+1);
panel=subpanel_create(mp,windowbutton[i],activebutton+i,
&multi_channel_set[i].panel_active,
&multi_channel_set[i].panel_visible,
buffer,NULL,
i,1);
compandpanel_create(mp,panel,multi_channel_set+1);
}
}
......
......@@ -24,6 +24,9 @@
extern void compandpanel_create_master (postfish_mainpanel *mp,
GtkWidget *windowbutton,
GtkWidget *activebutton);
extern void compandpanel_create_channel(postfish_mainpanel *mp,
GtkWidget **windowbutton,
GtkWidget **activebutton);
extern void compandpanel_feedback(int displayit);
extern void compandpanel_reset(void);
......
......@@ -949,7 +949,7 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
mainpanel_chentry(panel,channeltable,"Mute ",0,0,0,mutedummy_create);
mainpanel_chentry(panel,channeltable,"_Declip ",1,1,0,clippanel_create);
mainpanel_chentry(panel,channeltable,"_Multicomp ",2,0,1,0);
mainpanel_chentry(panel,channeltable,"_Multicomp ",2,0,1,compandpanel_create_channel);
mainpanel_chentry(panel,channeltable,"_Onecomp ",3,0,1,0);
mainpanel_chentry(panel,channeltable,"De_verb ",4,1,0,0);
mainpanel_chentry(panel,channeltable,"_Reverb ",5,1,0,0);
......
......@@ -74,6 +74,8 @@ typedef struct {
} multicompand_state;
multicompand_settings multi_master_set;
multicompand_settings *multi_channel_set;
static multicompand_state ms;
static feedback_generic *new_multicompand_feedback(void){
......@@ -141,6 +143,8 @@ int multicompand_load(void){
int qblocksize=input_size/8;
memset(&ms,0,sizeof(ms));
multi_channel_set=calloc(input_ch,sizeof(*multi_channel_set));
subband_load(&ms.ss,multicomp_freqs_max,qblocksize);
for(h=0;h<multicomp_banks;h++)
......
#define VERSION "$Id$ "
/* DO NOT EDIT: Automated versioning hack [Fri Apr 23 02:09:14 EDT 2004] */
/* DO NOT EDIT: Automated versioning hack [Fri Apr 23 02:21:55 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