[xiph-cvs] r6580 - trunk/postfish
xiphmont at xiph.org
xiphmont at xiph.org
Tue May 4 21:25:54 PDT 2004
Author: xiphmont
Date: 2004-04-23 02:10:31 -0400 (Fri, 23 Apr 2004)
New Revision: 6580
Modified:
trunk/postfish/compandpanel.c
trunk/postfish/compandpanel.h
trunk/postfish/mainpanel.c
trunk/postfish/mainpanel.h
trunk/postfish/version.h
Log:
Fix a multicompand panel bug where dragging the 31Hz slider in
half-octave mode does not updte the 25Hz slider in third-octave mode
Finished abstracting compander panel to allow multiple panels.
<p><p>Modified: trunk/postfish/compandpanel.c
===================================================================
--- trunk/postfish/compandpanel.c 2004-04-22 22:37:04 UTC (rev 6579)
+++ trunk/postfish/compandpanel.c 2004-04-23 06:10:31 UTC (rev 6580)
@@ -43,20 +43,55 @@
GtkWidget *slider;
GtkWidget *readouto;
GtkWidget *readoutu;
+ struct multi_panel_state *mp;
int number;
} cbar;
-typedef struct {
+typedef struct{
+ Readout *r;
+ sig_atomic_t *v;
+} callback_arg_rv;
+
+typedef struct{
Readout *r0;
Readout *r1;
- Readout *r2;
-} multireadout;
+ sig_atomic_t *v0;
+ sig_atomic_t *v1;
+} callback_arg_rv2;
-static int bank_active=2;
-static cbar bars[multicomp_freqs_max+1];
-static int inactive_updatep=1;
+typedef struct{
+ struct multi_panel_state *mp;
+ int val;
+} callback_arg_mi;
-static void compand_change(GtkWidget *w,Readout *r,sig_atomic_t *var){
+typedef struct multi_panel_state{
+ callback_arg_rv over_compand;
+ callback_arg_rv under_compand;
+ callback_arg_rv base_compand;
+
+ callback_arg_rv over_lookahead;
+ callback_arg_rv under_lookahead;
+
+ callback_arg_rv2 over_timing;
+ callback_arg_rv2 under_timing;
+ callback_arg_rv2 base_timing;
+
+ callback_arg_mi octave_full;
+ callback_arg_mi octave_half;
+ callback_arg_mi octave_third;
+
+ int bank_active;
+ int inactive_updatep;
+ int updating_av_slider;
+ multicompand_settings *ms;
+ cbar bars[multicomp_freqs_max+1];
+
+} multi_panel_state;
+
+multi_panel_state *master_panel;
+
+static void compand_change(GtkWidget *w,gpointer in){
+ callback_arg_rv *ca=(callback_arg_rv *)in;
char buffer[80];
float val=1./multibar_get_value(MULTIBAR(w),0);
@@ -72,112 +107,79 @@
sprintf(buffer,"1:%4.1f",1./val);
}
- readout_set(r,buffer);
+ readout_set(ca->r,buffer);
- *var=rint(val*1000.);
+ *ca->v=rint(val*1000.);
}
-static void under_compand_change(GtkWidget *w,gpointer in){
- compand_change(w,(Readout *)in,&multi_master_set.under_ratio);
-}
-static void over_compand_change(GtkWidget *w,gpointer in){
- compand_change(w,(Readout *)in,&multi_master_set.over_ratio);
-}
+static void timing_change(GtkWidget *w,gpointer in){
+ callback_arg_rv2 *ca=(callback_arg_rv2 *)in;
-static void base_compand_change(GtkWidget *w,gpointer in){
- compand_change(w,(Readout *)in,&multi_master_set.base_ratio);
-}
-
-static void timing_display(GtkWidget *w,Readout *r,float v){
+ float attack=multibar_get_value(MULTIBAR(w),0);
+ float decay=multibar_get_value(MULTIBAR(w),1);
char buffer[80];
- if(v<10){
- sprintf(buffer,"%4.2fms",v);
- }else if(v<100){
- sprintf(buffer,"%4.1fms",v);
- }else if (v<1000){
- sprintf(buffer,"%4.0fms",v);
- }else if (v<10000){
- sprintf(buffer,"%4.2fs",v/1000.);
+ if(attack<10){
+ sprintf(buffer,"%4.2fms",attack);
+ }else if(attack<100){
+ sprintf(buffer,"%4.1fms",attack);
+ }else if (attack<1000){
+ sprintf(buffer,"%4.0fms",attack);
+ }else if (attack<10000){
+ sprintf(buffer,"%4.2fs",attack/1000.);
}else{
- sprintf(buffer,"%4.1fs",v/1000.);
+ sprintf(buffer,"%4.1fs",attack/1000.);
}
+ readout_set(ca->r0,buffer);
- readout_set(r,buffer);
-}
+ if(decay<10){
+ sprintf(buffer,"%4.2fms",decay);
+ }else if(decay<100){
+ sprintf(buffer,"%4.1fms",decay);
+ }else if (decay<1000){
+ sprintf(buffer,"%4.0fms",decay);
+ }else if (decay<10000){
+ sprintf(buffer,"%4.2fs",decay/1000.);
+ }else{
+ sprintf(buffer,"%4.1fs",decay/1000.);
+ }
+ readout_set(ca->r1,buffer);
-static void under_timing_change(GtkWidget *w,gpointer in){
- multireadout *r=(multireadout *)in;
- float attack=multibar_get_value(MULTIBAR(w),0);
- float decay=multibar_get_value(MULTIBAR(w),1);
-
- timing_display(w,r->r0,attack);
- timing_display(w,r->r1,decay);
-
- multi_master_set.under_attack=rint(attack*10.);
- multi_master_set.under_decay=rint(decay*10.);
+ *ca->v0=rint(attack*10.);
+ *ca->v1=rint(decay*10.);
}
-static void over_timing_change(GtkWidget *w,gpointer in){
- multireadout *r=(multireadout *)in;
- float attack=multibar_get_value(MULTIBAR(w),0);
- float decay=multibar_get_value(MULTIBAR(w),1);
-
- timing_display(w,r->r0,attack);
- timing_display(w,r->r1,decay);
-
- multi_master_set.over_attack=rint(attack*10.);
- multi_master_set.over_decay=rint(decay*10.);
-}
-
-static void base_timing_change(GtkWidget *w,gpointer in){
- multireadout *r=(multireadout *)in;
- float attack=multibar_get_value(MULTIBAR(w),0);
- float decay=multibar_get_value(MULTIBAR(w),1);
-
- timing_display(w,r->r0,attack);
- timing_display(w,r->r1,decay);
-
- multi_master_set.base_attack=rint(attack*10.);
- multi_master_set.base_decay=rint(decay*10.);
-}
-
-static void under_lookahead_change(GtkWidget *w,gpointer in){
+static void lookahead_change(GtkWidget *w,gpointer in){
+ callback_arg_rv *ca=(callback_arg_rv *)in;
char buffer[80];
- Readout *r=(Readout *)in;
+ Readout *r=ca->r;
float val=multibar_get_value(MULTIBAR(w),0);
sprintf(buffer,"%3.0f%%",val);
readout_set(r,buffer);
- multi_master_set.under_lookahead=rint(val*10.);
+ *ca->v=rint(val*10.);
}
-static void over_lookahead_change(GtkWidget *w,gpointer in){
- char buffer[80];
- Readout *r=(Readout *)in;
- float val=multibar_get_value(MULTIBAR(w),0);
-
- sprintf(buffer,"%3.0f%%",val);
- readout_set(r,buffer);
+static void average_change(GtkWidget *w,gpointer in){
+ multi_panel_state *mp=(multi_panel_state *)in;
+ multicompand_settings *ms=mp->ms;
+ banked_multicompand_settings *bc=ms->bc;
+ cbar *b=mp->bars+multicomp_freqs_max;
+ cbar *bars=mp->bars;
+ int bank_active=mp->bank_active;
- multi_master_set.over_lookahead=rint(val*10.);
-}
-
-static int updating_av_slider=0;
-static void average_change(GtkWidget *w,gpointer in){
- cbar *b=bars+multicomp_freqs_max;
+ int i;
float o,u;
float oav=0,uav=0;
- int i;
-
+
u=rint(multibar_get_value(MULTIBAR(b->slider),0));
o=rint(multibar_get_value(MULTIBAR(b->slider),1));
/* compute the current average */
for(i=0;i<multicomp_freqs[bank_active];i++){
- oav+=rint(multi_master_set.bc[bank_active].static_o[i]);
- uav+=rint(multi_master_set.bc[bank_active].static_u[i]);
+ oav+=rint(bc[bank_active].static_o[i]);
+ uav+=rint(bc[bank_active].static_u[i]);
}
oav=rint(oav/multicomp_freqs[bank_active]);
uav=rint(uav/multicomp_freqs[bank_active]);
@@ -185,8 +187,8 @@
u-=uav;
o-=oav;
- if(!updating_av_slider){
- updating_av_slider=1;
+ if(!mp->updating_av_slider){
+ mp->updating_av_slider=1;
if(o!=0.){
/* update o sliders */
for(i=0;i<multicomp_freqs[bank_active];i++){
@@ -196,7 +198,7 @@
/* update u average (might have pushed it) */
uav=0;
for(i=0;i<multicomp_freqs[bank_active];i++)
- uav+=rint(multi_master_set.bc[bank_active].static_u[i]);
+ uav+=rint(bc[bank_active].static_u[i]);
uav=rint(uav/multicomp_freqs[bank_active]);
multibar_thumb_set(MULTIBAR(bars[multicomp_freqs_max].slider),uav,0);
}else{
@@ -208,17 +210,22 @@
/* update o average (might have pushed it) */
oav=0;
for(i=0;i<multicomp_freqs[bank_active];i++)
- oav+=rint(multi_master_set.bc[bank_active].static_o[i]);
+ oav+=rint(bc[bank_active].static_o[i]);
oav=rint(oav/multicomp_freqs[bank_active]);
multibar_thumb_set(MULTIBAR(bars[multicomp_freqs_max].slider),oav,1);
}
- updating_av_slider=0;
+ mp->updating_av_slider=0;
}
}
static void slider_change(GtkWidget *w,gpointer in){
char buffer[80];
cbar *b=(cbar *)in;
+ multi_panel_state *mp=b->mp;
+ multicompand_settings *ms=mp->ms;
+ banked_multicompand_settings *bc=ms->bc;
+ int bank_active=mp->bank_active;
+
int o,u;
int i;
int adj;
@@ -226,173 +233,174 @@
u=multibar_get_value(MULTIBAR(b->slider),0);
sprintf(buffer,"%+4ddB",u);
readout_set(READOUT(b->readoutu),buffer);
- multi_master_set.bc[bank_active].static_u[b->number]=u;
+ bc[bank_active].static_u[b->number]=u;
o=multibar_get_value(MULTIBAR(b->slider),1);
sprintf(buffer,"%+4ddB",o);
readout_set(READOUT(b->readouto),buffer);
- multi_master_set.bc[bank_active].static_o[b->number]=o;
+ bc[bank_active].static_o[b->number]=o;
- if(inactive_updatep){
+ if(mp->inactive_updatep){
/* keep the inactive banks also tracking settings */
switch(bank_active){
case 0:
if(b->number==0){
- multi_master_set.bc[2].static_o[0]+=o-multi_master_set.bc[2].static_o[1];
- multi_master_set.bc[2].static_u[0]+=u-multi_master_set.bc[2].static_u[1];
+ bc[2].static_o[0]+=o-bc[2].static_o[1];
+ bc[2].static_u[0]+=u-bc[2].static_u[1];
}
/* convolutions for roundoff behavior */
if(b->number>0){
- adj=(multi_master_set.bc[1].static_o[b->number*2-1]*2 -
- multi_master_set.bc[1].static_o[b->number*2-2]-multi_master_set.bc[1].static_o[b->number*2])/2;
- multi_master_set.bc[1].static_o[b->number*2-1]=
- (multi_master_set.bc[1].static_o[b->number*2-2]+o)/2+adj;
+ adj=(bc[1].static_o[b->number*2-1]*2 -
+ bc[1].static_o[b->number*2-2]-bc[1].static_o[b->number*2])/2;
+ bc[1].static_o[b->number*2-1]=
+ (bc[1].static_o[b->number*2-2]+o)/2+adj;
- adj=(multi_master_set.bc[1].static_u[b->number*2-1]*2 -
- multi_master_set.bc[1].static_u[b->number*2-2]-multi_master_set.bc[1].static_u[b->number*2])/2;
- multi_master_set.bc[1].static_u[b->number*2-1]=
- (multi_master_set.bc[1].static_u[b->number*2-2]+u)/2+adj;
+ adj=(bc[1].static_u[b->number*2-1]*2 -
+ bc[1].static_u[b->number*2-2]-bc[1].static_u[b->number*2])/2;
+ bc[1].static_u[b->number*2-1]=
+ (bc[1].static_u[b->number*2-2]+u)/2+adj;
- adj=(multi_master_set.bc[2].static_o[b->number*3-1]*3 -
- multi_master_set.bc[2].static_o[b->number*3-2] -
- multi_master_set.bc[2].static_o[b->number*3-2] -
- multi_master_set.bc[2].static_o[b->number*3+1])/3;
- multi_master_set.bc[2].static_o[b->number*3-1]=
- (multi_master_set.bc[2].static_o[b->number*3-2]+
- multi_master_set.bc[2].static_o[b->number*3-2]+
+ adj=(bc[2].static_o[b->number*3-1]*3 -
+ bc[2].static_o[b->number*3-2] -
+ bc[2].static_o[b->number*3-2] -
+ bc[2].static_o[b->number*3+1])/3;
+ bc[2].static_o[b->number*3-1]=
+ (bc[2].static_o[b->number*3-2]+
+ bc[2].static_o[b->number*3-2]+
o)/3+adj;
- adj=(multi_master_set.bc[2].static_o[b->number*3]*3 -
- multi_master_set.bc[2].static_o[b->number*3-2] -
- multi_master_set.bc[2].static_o[b->number*3+1] -
- multi_master_set.bc[2].static_o[b->number*3+1])/3;
- multi_master_set.bc[2].static_o[b->number*3]=
- (multi_master_set.bc[2].static_o[b->number*3-2]+o+o)/3+adj;
+ adj=(bc[2].static_o[b->number*3]*3 -
+ bc[2].static_o[b->number*3-2] -
+ bc[2].static_o[b->number*3+1] -
+ bc[2].static_o[b->number*3+1])/3;
+ bc[2].static_o[b->number*3]=
+ (bc[2].static_o[b->number*3-2]+o+o)/3+adj;
- adj=(multi_master_set.bc[2].static_u[b->number*3-1]*3 -
- multi_master_set.bc[2].static_u[b->number*3-2] -
- multi_master_set.bc[2].static_u[b->number*3-2] -
- multi_master_set.bc[2].static_u[b->number*3+1])/3;
- multi_master_set.bc[2].static_u[b->number*3-1]=
- (multi_master_set.bc[2].static_u[b->number*3-2]+
- multi_master_set.bc[2].static_u[b->number*3-2]+
+ adj=(bc[2].static_u[b->number*3-1]*3 -
+ bc[2].static_u[b->number*3-2] -
+ bc[2].static_u[b->number*3-2] -
+ bc[2].static_u[b->number*3+1])/3;
+ bc[2].static_u[b->number*3-1]=
+ (bc[2].static_u[b->number*3-2]+
+ bc[2].static_u[b->number*3-2]+
u)/3+adj;
- adj=(multi_master_set.bc[2].static_u[b->number*3]*3 -
- multi_master_set.bc[2].static_u[b->number*3-2] -
- multi_master_set.bc[2].static_u[b->number*3+1] -
- multi_master_set.bc[2].static_u[b->number*3+1])/3;
- multi_master_set.bc[2].static_u[b->number*3]=
- (multi_master_set.bc[2].static_u[b->number*3-2]+u+u)/3+adj;
+ adj=(bc[2].static_u[b->number*3]*3 -
+ bc[2].static_u[b->number*3-2] -
+ bc[2].static_u[b->number*3+1] -
+ bc[2].static_u[b->number*3+1])/3;
+ bc[2].static_u[b->number*3]=
+ (bc[2].static_u[b->number*3-2]+u+u)/3+adj;
}
if(b->number<9){
- adj=(multi_master_set.bc[1].static_o[b->number*2+1]*2-
- multi_master_set.bc[1].static_o[b->number*2+2]-multi_master_set.bc[1].static_o[b->number*2])/2;
- multi_master_set.bc[1].static_o[b->number*2+1]=
- (multi_master_set.bc[1].static_o[b->number*2+2]+o)/2+adj;
+ adj=(bc[1].static_o[b->number*2+1]*2-
+ bc[1].static_o[b->number*2+2]-bc[1].static_o[b->number*2])/2;
+ bc[1].static_o[b->number*2+1]=
+ (bc[1].static_o[b->number*2+2]+o)/2+adj;
- adj=(multi_master_set.bc[1].static_u[b->number*2+1]*2-
- multi_master_set.bc[1].static_u[b->number*2+2]-multi_master_set.bc[1].static_u[b->number*2])/2;
- multi_master_set.bc[1].static_u[b->number*2+1]=
- (multi_master_set.bc[1].static_u[b->number*2+2]+u)/2+adj;
+ adj=(bc[1].static_u[b->number*2+1]*2-
+ bc[1].static_u[b->number*2+2]-bc[1].static_u[b->number*2])/2;
+ bc[1].static_u[b->number*2+1]=
+ (bc[1].static_u[b->number*2+2]+u)/2+adj;
- adj=(multi_master_set.bc[2].static_o[b->number*3+3]*3 -
- multi_master_set.bc[2].static_o[b->number*3+4] -
- multi_master_set.bc[2].static_o[b->number*3+4] -
- multi_master_set.bc[2].static_o[b->number*3+1])/3;
- multi_master_set.bc[2].static_o[b->number*3+3]=
- (multi_master_set.bc[2].static_o[b->number*3+4]+
- multi_master_set.bc[2].static_o[b->number*3+4]+
+ adj=(bc[2].static_o[b->number*3+3]*3 -
+ bc[2].static_o[b->number*3+4] -
+ bc[2].static_o[b->number*3+4] -
+ bc[2].static_o[b->number*3+1])/3;
+ bc[2].static_o[b->number*3+3]=
+ (bc[2].static_o[b->number*3+4]+
+ bc[2].static_o[b->number*3+4]+
o)/3+adj;
- adj=(multi_master_set.bc[2].static_o[b->number*3+2]*3 -
- multi_master_set.bc[2].static_o[b->number*3+4] -
- multi_master_set.bc[2].static_o[b->number*3+1] -
- multi_master_set.bc[2].static_o[b->number*3+1])/3;
- multi_master_set.bc[2].static_o[b->number*3+2]=
- (multi_master_set.bc[2].static_o[b->number*3+4]+o+o)/3+adj;
+ adj=(bc[2].static_o[b->number*3+2]*3 -
+ bc[2].static_o[b->number*3+4] -
+ bc[2].static_o[b->number*3+1] -
+ bc[2].static_o[b->number*3+1])/3;
+ bc[2].static_o[b->number*3+2]=
+ (bc[2].static_o[b->number*3+4]+o+o)/3+adj;
- adj=(multi_master_set.bc[2].static_u[b->number*3+3]*3 -
- multi_master_set.bc[2].static_u[b->number*3+4] -
- multi_master_set.bc[2].static_u[b->number*3+4] -
- multi_master_set.bc[2].static_u[b->number*3+1])/3;
- multi_master_set.bc[2].static_u[b->number*3+3]=
- (multi_master_set.bc[2].static_u[b->number*3+4]+
- multi_master_set.bc[2].static_u[b->number*3+4]+
+ adj=(bc[2].static_u[b->number*3+3]*3 -
+ bc[2].static_u[b->number*3+4] -
+ bc[2].static_u[b->number*3+4] -
+ bc[2].static_u[b->number*3+1])/3;
+ bc[2].static_u[b->number*3+3]=
+ (bc[2].static_u[b->number*3+4]+
+ bc[2].static_u[b->number*3+4]+
u)/3+adj;
- adj=(multi_master_set.bc[2].static_u[b->number*3+2]*3 -
- multi_master_set.bc[2].static_u[b->number*3+4] -
- multi_master_set.bc[2].static_u[b->number*3+1] -
- multi_master_set.bc[2].static_u[b->number*3+1])/3;
- multi_master_set.bc[2].static_u[b->number*3+2]=
- (multi_master_set.bc[2].static_u[b->number*3+4]+u+u)/3+adj;
+ adj=(bc[2].static_u[b->number*3+2]*3 -
+ bc[2].static_u[b->number*3+4] -
+ bc[2].static_u[b->number*3+1] -
+ bc[2].static_u[b->number*3+1])/3;
+ bc[2].static_u[b->number*3+2]=
+ (bc[2].static_u[b->number*3+4]+u+u)/3+adj;
}
if(b->number==9){
- multi_master_set.bc[1].static_o[19]+=o-multi_master_set.bc[1].static_o[18];
- multi_master_set.bc[1].static_u[19]+=u-multi_master_set.bc[1].static_u[18];
- multi_master_set.bc[2].static_o[29]+=o-multi_master_set.bc[2].static_o[28];
- multi_master_set.bc[2].static_u[29]+=u-multi_master_set.bc[2].static_u[28];
+ bc[1].static_o[19]+=o-bc[1].static_o[18];
+ bc[1].static_u[19]+=u-bc[1].static_u[18];
+ bc[2].static_o[29]+=o-bc[2].static_o[28];
+ bc[2].static_u[29]+=u-bc[2].static_u[28];
}
- multi_master_set.bc[1].static_o[b->number*2]=o;
- multi_master_set.bc[1].static_u[b->number*2]=u;
- multi_master_set.bc[2].static_o[b->number*3+1]=o;
- multi_master_set.bc[2].static_u[b->number*3+1]=u;
+ bc[1].static_o[b->number*2]=o;
+ bc[1].static_u[b->number*2]=u;
+ bc[2].static_o[b->number*3+1]=o;
+ bc[2].static_u[b->number*3+1]=u;
break;
case 1:
+
+ if(b->number==0){
+ bc[2].static_o[0]+=o-bc[2].static_o[1];
+ bc[2].static_u[0]+=u-bc[2].static_u[1];
+ }
if((b->number&1)==0){
- multi_master_set.bc[0].static_o[b->number>>1]=o;
- multi_master_set.bc[0].static_u[b->number>>1]=u;
- multi_master_set.bc[2].static_o[b->number/2*3+1]=o;
- multi_master_set.bc[2].static_u[b->number/2*3+1]=u;
+ bc[0].static_o[b->number>>1]=o;
+ bc[0].static_u[b->number>>1]=u;
+ bc[2].static_o[b->number/2*3+1]=o;
+ bc[2].static_u[b->number/2*3+1]=u;
}else{
if(b->number<19){
- int val=(multi_master_set.bc[2].static_o[b->number/2*3+2]+
- multi_master_set.bc[2].static_o[b->number/2*3+3])/2;
- multi_master_set.bc[2].static_o[b->number/2*3+2]+=(o-val);
- multi_master_set.bc[2].static_o[b->number/2*3+3]+=(o-val);
+ int val=(bc[2].static_o[b->number/2*3+2]+
+ bc[2].static_o[b->number/2*3+3])/2;
+ bc[2].static_o[b->number/2*3+2]+=(o-val);
+ bc[2].static_o[b->number/2*3+3]+=(o-val);
- val=(multi_master_set.bc[2].static_u[b->number/2*3+2]+
- multi_master_set.bc[2].static_u[b->number/2*3+3])/2;
- multi_master_set.bc[2].static_u[b->number/2*3+2]+=(u-val);
- multi_master_set.bc[2].static_u[b->number/2*3+3]+=(u-val);
+ val=(bc[2].static_u[b->number/2*3+2]+
+ bc[2].static_u[b->number/2*3+3])/2;
+ bc[2].static_u[b->number/2*3+2]+=(u-val);
+ bc[2].static_u[b->number/2*3+3]+=(u-val);
}else{
- multi_master_set.bc[2].static_o[b->number/2*3+2]=o;
- multi_master_set.bc[2].static_u[b->number/2*3+2]=u;
+ bc[2].static_o[b->number/2*3+2]=o;
+ bc[2].static_u[b->number/2*3+2]=u;
}
}
- if(b->number==0){
- multi_master_set.bc[2].static_o[0]+=o-multi_master_set.bc[2].static_o[1];
- multi_master_set.bc[2].static_u[0]+=u-multi_master_set.bc[2].static_u[1];
- }
break;
case 2:
if((b->number%3)==1){
- multi_master_set.bc[0].static_o[b->number/3]=o;
- multi_master_set.bc[0].static_u[b->number/3]=u;
- multi_master_set.bc[1].static_o[b->number/3*2]=o;
- multi_master_set.bc[1].static_u[b->number/3*2]=u;
+ bc[0].static_o[b->number/3]=o;
+ bc[0].static_u[b->number/3]=u;
+ bc[1].static_o[b->number/3*2]=o;
+ bc[1].static_u[b->number/3*2]=u;
}else if(b->number>1){
if(b->number<29){
- multi_master_set.bc[1].static_o[(b->number-1)/3*2+1]=
- (multi_master_set.bc[2].static_o[(b->number-1)/3*3+2]+
- multi_master_set.bc[2].static_o[(b->number-1)/3*3+3])/2;
- multi_master_set.bc[1].static_u[(b->number-1)/3*2+1]=
- (multi_master_set.bc[2].static_u[(b->number-1)/3*3+2]+
- multi_master_set.bc[2].static_u[(b->number-1)/3*3+3])/2;
+ bc[1].static_o[(b->number-1)/3*2+1]=
+ (bc[2].static_o[(b->number-1)/3*3+2]+
+ bc[2].static_o[(b->number-1)/3*3+3])/2;
+ bc[1].static_u[(b->number-1)/3*2+1]=
+ (bc[2].static_u[(b->number-1)/3*3+2]+
+ bc[2].static_u[(b->number-1)/3*3+3])/2;
}else{
- multi_master_set.bc[1].static_o[(b->number-1)/3*2+1]=o;
- multi_master_set.bc[1].static_u[(b->number-1)/3*2+1]=u;
+ bc[1].static_o[(b->number-1)/3*2+1]=o;
+ bc[1].static_u[(b->number-1)/3*2+1]=u;
}
}
break;
@@ -400,95 +408,91 @@
}
/* update average slider */
- if(!updating_av_slider && bars[multicomp_freqs_max].slider){
+ if(!mp->updating_av_slider && mp->bars[multicomp_freqs_max].slider){
float oav=0,uav=0;
- updating_av_slider=1;
+ mp->updating_av_slider=1;
/* compute the current average */
for(i=0;i<multicomp_freqs[bank_active];i++){
- oav+=rint(multi_master_set.bc[bank_active].static_o[i]);
- uav+=rint(multi_master_set.bc[bank_active].static_u[i]);
+ oav+=rint(bc[bank_active].static_o[i]);
+ uav+=rint(bc[bank_active].static_u[i]);
}
oav=rint(oav/multicomp_freqs[bank_active]);
uav=rint(uav/multicomp_freqs[bank_active]);
- multibar_thumb_set(MULTIBAR(bars[multicomp_freqs_max].slider),uav,0);
- multibar_thumb_set(MULTIBAR(bars[multicomp_freqs_max].slider),oav,1);
- updating_av_slider=0;
+ multibar_thumb_set(MULTIBAR(mp->bars[multicomp_freqs_max].slider),uav,0);
+ multibar_thumb_set(MULTIBAR(mp->bars[multicomp_freqs_max].slider),oav,1);
+ mp->updating_av_slider=0;
}
}
static void static_octave(GtkWidget *w,gpointer in){
- int octave=(int)in,i;
+ callback_arg_mi *ca=(callback_arg_mi *)in;
+ multi_panel_state *mp=ca->mp;
+ multicompand_settings *ms=mp->ms;
+ banked_multicompand_settings *bc=ms->bc;
+ int octave=ca->val,i;
if(!w || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))){
- if(bank_active!=octave || w==NULL){
- bank_active=octave;
+ if(mp->bank_active!=octave || w==NULL){
+ int bank_active=mp->bank_active=octave;
/* map, unmap, relabel */
for(i=0;i<multicomp_freqs_max;i++){
if(i<multicomp_freqs[bank_active]){
- gtk_label_set_text(GTK_LABEL(bars[i].label),
+ gtk_label_set_text(GTK_LABEL(mp->bars[i].label),
multicomp_freq_labels[bank_active][i]);
- gtk_widget_show(bars[i].label);
- gtk_widget_show(bars[i].slider);
- gtk_widget_show(bars[i].readouto);
- gtk_widget_show(bars[i].readoutu);
+ gtk_widget_show(mp->bars[i].label);
+ gtk_widget_show(mp->bars[i].slider);
+ gtk_widget_show(mp->bars[i].readouto);
+ gtk_widget_show(mp->bars[i].readoutu);
- inactive_updatep=0;
+ mp->inactive_updatep=0;
{
- float o=multi_master_set.bc[bank_active].static_o[i];
- float u=multi_master_set.bc[bank_active].static_u[i];
-
- multibar_thumb_set(MULTIBAR(bars[i].slider),u,0);
- multibar_thumb_set(MULTIBAR(bars[i].slider),o,1);
+ float o=bc[bank_active].static_o[i];
+ float u=bc[bank_active].static_u[i];
+
+ multibar_thumb_set(MULTIBAR(mp->bars[i].slider),u,0);
+ multibar_thumb_set(MULTIBAR(mp->bars[i].slider),o,1);
}
- inactive_updatep=1;
+ mp->inactive_updatep=1;
}else{
- gtk_widget_hide(bars[i].label);
- gtk_widget_hide(bars[i].slider);
- gtk_widget_hide(bars[i].readouto);
- gtk_widget_hide(bars[i].readoutu);
+ gtk_widget_hide(mp->bars[i].label);
+ gtk_widget_hide(mp->bars[i].slider);
+ gtk_widget_hide(mp->bars[i].readouto);
+ gtk_widget_hide(mp->bars[i].readoutu);
}
}
- multi_master_set.active_bank=bank_active;
+ ms->active_bank=bank_active;
}
}
}
-static void over_mode(GtkButton *b,gpointer in){
- int mode=(int)in;
- multi_master_set.over_mode=mode;
+static void mode_rms(GtkButton *b,gpointer in){
+ sig_atomic_t *var=(sig_atomic_t *)in;
+ *var=0;
}
-static void under_mode(GtkButton *b,gpointer in){
- int mode=(int)in;
- multi_master_set.under_mode=mode;
+static void mode_peak(GtkButton *b,gpointer in){
+ sig_atomic_t *var=(sig_atomic_t *)in;
+ *var=1;
}
-static void base_mode(GtkButton *b,gpointer in){
- int mode=(int)in;
- multi_master_set.base_mode=mode;
-}
-
-static void under_knee(GtkToggleButton *b,gpointer in){
+static void mode_knee(GtkToggleButton *b,gpointer in){
int mode=gtk_toggle_button_get_active(b);
- multi_master_set.under_softknee=mode;
+ sig_atomic_t *var=(sig_atomic_t *)in;
+ *var=mode;
}
-static void over_knee(GtkToggleButton *b,gpointer in){
- int mode=gtk_toggle_button_get_active(b);
- multi_master_set.over_softknee=mode;
-}
-
-void compandpanel_create(postfish_mainpanel *mp,
- GtkWidget *windowbutton,
- GtkWidget *activebutton){
+static void compandpanel_create(postfish_mainpanel *mp,
+ multicompand_settings *ms,
+ GtkWidget *windowbutton,
+ GtkWidget *activebutton){
int i;
char *labels[14]={"130","120","110","100","90","80","70",
"60","50","40","30","20","10","0"};
@@ -507,11 +511,16 @@
char *shortcut[]={" m "};
subpanel_generic *panel=subpanel_create(mp,windowbutton,&activebutton,
- &multi_master_set.panel_active,
- &multi_master_set.panel_visible,
+ &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;
+ ps->ms=ms;
+
GtkWidget *hbox=gtk_hbox_new(0,0);
GtkWidget *sliderbox=gtk_vbox_new(0,0);
GtkWidget *sliderframe=gtk_frame_new(NULL);
@@ -527,6 +536,7 @@
GtkWidget *baselabel=gtk_label_new("Global compand ");
GtkWidget *basetable=gtk_table_new(3,4,0);
+
gtk_widget_set_name(overlabel,"framelabel");
gtk_widget_set_name(underlabel,"framelabel");
gtk_widget_set_name(baselabel,"framelabel");
@@ -555,14 +565,21 @@
gtk_widget_set_name(label3,"scalemarker");
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(octave_b),1);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(octave_b),0);
+ ps->octave_full.mp=ps;
+ ps->octave_full.val=0;
+ ps->octave_half.mp=ps;
+ ps->octave_half.val=1;
+ ps->octave_third.mp=ps;
+ ps->octave_third.val=2;
+
g_signal_connect (G_OBJECT (octave_a), "clicked",
- G_CALLBACK (static_octave), (gpointer)0);
+ G_CALLBACK (static_octave), &ps->octave_full);
g_signal_connect (G_OBJECT (octave_b), "clicked",
- G_CALLBACK (static_octave), (gpointer)1);
+ G_CALLBACK (static_octave), &ps->octave_half);
g_signal_connect (G_OBJECT (octave_c), "clicked",
- G_CALLBACK (static_octave), (gpointer)2);
+ G_CALLBACK (static_octave), &ps->octave_third);
gtk_table_attach(GTK_TABLE(slidertable),label2,1,2,0,1,GTK_FILL,GTK_FILL|GTK_EXPAND,2,0);
gtk_table_attach(GTK_TABLE(slidertable),label3,3,4,0,1,GTK_FILL,GTK_FILL|GTK_EXPAND,2,0);
@@ -619,11 +636,11 @@
gtk_box_pack_end(GTK_BOX(envelopebox),knee_button,0,0,5);
g_signal_connect (G_OBJECT (knee_button), "clicked",
- G_CALLBACK (under_knee), (gpointer)0);
+ G_CALLBACK (mode_knee), &ps->ms->under_softknee);
g_signal_connect (G_OBJECT (rms_button), "clicked",
- G_CALLBACK (under_mode), (gpointer)0);
+ G_CALLBACK (mode_rms), &ps->ms->under_mode);
g_signal_connect (G_OBJECT (peak_button), "clicked",
- G_CALLBACK (under_mode), (gpointer)1); //To Hell I Go
+ G_CALLBACK (mode_peak), &ps->ms->under_mode);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rms_button),1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(knee_button),1);
gtk_table_attach(GTK_TABLE(undertable),envelopebox,0,4,0,1,GTK_FILL,0,0,0);
@@ -636,7 +653,10 @@
GtkWidget *readout=readout_new("1.55:1");
GtkWidget *slider=multibar_slider_new(8,compand_labels,compand_levels,1);
- multibar_callback(MULTIBAR(slider),under_compand_change,readout);
+ ps->under_compand.r=READOUT(readout);
+ ps->under_compand.v=&ps->ms->under_ratio;
+
+ multibar_callback(MULTIBAR(slider),compand_change,&ps->under_compand);
multibar_thumb_set(MULTIBAR(slider),1.,0);
gtk_misc_set_alignment(GTK_MISC(label),1.,.5);
@@ -652,15 +672,16 @@
{
GtkWidget *label=gtk_label_new("attack/decay:");
+ GtkWidget *readout0=readout_new(" 100ms");
GtkWidget *readout1=readout_new(" 100ms");
- GtkWidget *readout2=readout_new(" 100ms");
GtkWidget *slider=multibar_slider_new(5,timing_labels,timing_levels,2);
- multireadout *r=calloc(1,sizeof(*r));
- r->r0=(Readout *)readout1;
- r->r1=(Readout *)readout2;
+ ps->under_timing.r0=READOUT(readout0);
+ ps->under_timing.r1=READOUT(readout1);
+ ps->under_timing.v0=&ps->ms->under_attack;
+ ps->under_timing.v1=&ps->ms->under_decay;
- multibar_callback(MULTIBAR(slider),under_timing_change,r);
+ multibar_callback(MULTIBAR(slider),timing_change,&ps->under_timing);
multibar_thumb_set(MULTIBAR(slider),1,0);
multibar_thumb_set(MULTIBAR(slider),100,1);
@@ -669,8 +690,8 @@
gtk_table_set_row_spacing(GTK_TABLE(undertable),2,4);
gtk_table_attach(GTK_TABLE(undertable),label,0,1,4,5,GTK_FILL,0,2,0);
gtk_table_attach(GTK_TABLE(undertable),slider,1,2,4,5,GTK_FILL|GTK_EXPAND,GTK_FILL|GTK_EXPAND,2,0);
- gtk_table_attach(GTK_TABLE(undertable),readout1,2,3,4,5,GTK_FILL,0,0,0);
- gtk_table_attach(GTK_TABLE(undertable),readout2,3,4,4,5,GTK_FILL,0,0,0);
+ gtk_table_attach(GTK_TABLE(undertable),readout0,2,3,4,5,GTK_FILL,0,0,0);
+ gtk_table_attach(GTK_TABLE(undertable),readout1,3,4,4,5,GTK_FILL,0,0,0);
}
@@ -680,8 +701,11 @@
GtkWidget *label=gtk_label_new("lookahead:");
GtkWidget *readout=readout_new("100%");
GtkWidget *slider=multibar_slider_new(8,per_labels,per_levels,1);
-
- multibar_callback(MULTIBAR(slider),under_lookahead_change,readout);
+
+ ps->under_lookahead.r=READOUT(readout);
+ ps->under_lookahead.v=&ps->ms->under_lookahead;
+
+ multibar_callback(MULTIBAR(slider),lookahead_change,&ps->under_lookahead);
multibar_thumb_set(MULTIBAR(slider),100.,0);
multibar_thumb_increment(MULTIBAR(slider),1.,10.);
@@ -708,11 +732,11 @@
gtk_box_pack_end(GTK_BOX(envelopebox),knee_button,0,0,5);
g_signal_connect (G_OBJECT (knee_button), "clicked",
- G_CALLBACK (over_knee), (gpointer)0);
+ G_CALLBACK (mode_knee), &ps->ms->over_softknee);
g_signal_connect (G_OBJECT (rms_button), "clicked",
- G_CALLBACK (over_mode), (gpointer)0);
+ G_CALLBACK (mode_rms), &ps->ms->over_mode);
g_signal_connect (G_OBJECT (peak_button), "clicked",
- G_CALLBACK (over_mode), (gpointer)1); //To Hell I Go
+ G_CALLBACK (mode_peak), &ps->ms->over_mode);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rms_button),1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(knee_button),1);
gtk_table_attach(GTK_TABLE(overtable),envelopebox,0,4,0,1,GTK_FILL,0,0,0);
@@ -725,7 +749,10 @@
GtkWidget *readout=readout_new("1.55:1");
GtkWidget *slider=multibar_slider_new(8,compand_labels,compand_levels,1);
- multibar_callback(MULTIBAR(slider),over_compand_change,readout);
+ ps->over_compand.r=READOUT(readout);
+ ps->over_compand.v=&ps->ms->over_ratio;
+
+ multibar_callback(MULTIBAR(slider),compand_change,&ps->over_compand);
multibar_thumb_set(MULTIBAR(slider),1.,0);
gtk_misc_set_alignment(GTK_MISC(label),1.,.5);
@@ -741,15 +768,16 @@
{
GtkWidget *label=gtk_label_new("attack/decay:");
+ GtkWidget *readout0=readout_new(" 100ms");
GtkWidget *readout1=readout_new(" 100ms");
- GtkWidget *readout2=readout_new(" 100ms");
GtkWidget *slider=multibar_slider_new(5,timing_labels,timing_levels,2);
- multireadout *r=calloc(1,sizeof(*r));
- r->r0=(Readout *)readout1;
- r->r1=(Readout *)readout2;
-
- multibar_callback(MULTIBAR(slider),over_timing_change,r);
+ ps->over_timing.r0=READOUT(readout0);
+ ps->over_timing.r1=READOUT(readout1);
+ ps->over_timing.v0=&ps->ms->over_attack;
+ ps->over_timing.v1=&ps->ms->over_decay;
+
+ multibar_callback(MULTIBAR(slider),timing_change,&ps->over_timing);
multibar_thumb_set(MULTIBAR(slider),1,0);
multibar_thumb_set(MULTIBAR(slider),100,1);
@@ -758,8 +786,8 @@
gtk_table_set_row_spacing(GTK_TABLE(overtable),2,4);
gtk_table_attach(GTK_TABLE(overtable),label,0,1,5,6,GTK_FILL,0,2,0);
gtk_table_attach(GTK_TABLE(overtable),slider,1,2,5,6,GTK_FILL|GTK_EXPAND,GTK_FILL|GTK_EXPAND,2,0);
- gtk_table_attach(GTK_TABLE(overtable),readout1,2,3,5,6,GTK_FILL,0,0,0);
- gtk_table_attach(GTK_TABLE(overtable),readout2,3,4,5,6,GTK_FILL,0,0,0);
+ gtk_table_attach(GTK_TABLE(overtable),readout0,2,3,5,6,GTK_FILL,0,0,0);
+ gtk_table_attach(GTK_TABLE(overtable),readout1,3,4,5,6,GTK_FILL,0,0,0);
}
@@ -770,7 +798,10 @@
GtkWidget *readout=readout_new("100%");
GtkWidget *slider=multibar_slider_new(8,per_labels,per_levels,1);
- multibar_callback(MULTIBAR(slider),over_lookahead_change,readout);
+ ps->over_lookahead.r=READOUT(readout);
+ ps->over_lookahead.v=&ps->ms->over_lookahead;
+
+ multibar_callback(MULTIBAR(slider),lookahead_change,&ps->over_lookahead);
multibar_thumb_set(MULTIBAR(slider),100.,0);
multibar_thumb_increment(MULTIBAR(slider),1.,10.);
@@ -796,9 +827,9 @@
gtk_box_pack_end(GTK_BOX(envelopebox),rms_button,0,0,5);
g_signal_connect (G_OBJECT (rms_button), "clicked",
- G_CALLBACK (base_mode), (gpointer)0);
+ G_CALLBACK (mode_rms), &ps->ms->base_mode);
g_signal_connect (G_OBJECT (peak_button), "clicked",
- G_CALLBACK (base_mode), (gpointer)1); //To Hell I Go
+ G_CALLBACK (mode_peak), &ps->ms->base_mode);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rms_button),1);
gtk_table_attach(GTK_TABLE(basetable),envelopebox,0,4,0,1,GTK_FILL,0,0,0);
}
@@ -810,7 +841,10 @@
GtkWidget *readout=readout_new("1.55:1");
GtkWidget *slider=multibar_slider_new(8,compand_labels,compand_levels,1);
- multibar_callback(MULTIBAR(slider),base_compand_change,readout);
+ ps->base_compand.r=READOUT(readout);
+ ps->base_compand.v=&ps->ms->base_ratio;
+
+ multibar_callback(MULTIBAR(slider),compand_change,&ps->base_compand);
multibar_thumb_set(MULTIBAR(slider),1.,0);
gtk_misc_set_alignment(GTK_MISC(label),1.,.5);
@@ -826,15 +860,16 @@
{
GtkWidget *label=gtk_label_new("attack/decay:");
+ GtkWidget *readout0=readout_new(" 100ms");
GtkWidget *readout1=readout_new(" 100ms");
- GtkWidget *readout2=readout_new(" 100ms");
GtkWidget *slider=multibar_slider_new(5,timing_labels,timing_levels,2);
- multireadout *r=calloc(1,sizeof(*r));
- r->r0=(Readout *)readout1;
- r->r1=(Readout *)readout2;
+ ps->base_timing.r0=READOUT(readout0);
+ ps->base_timing.r1=READOUT(readout1);
+ ps->base_timing.v0=&ps->ms->base_attack;
+ ps->base_timing.v1=&ps->ms->base_decay;
- multibar_callback(MULTIBAR(slider),base_timing_change,r);
+ multibar_callback(MULTIBAR(slider),timing_change,&ps->base_timing);
multibar_thumb_set(MULTIBAR(slider),1,0);
multibar_thumb_set(MULTIBAR(slider),100,1);
@@ -843,8 +878,8 @@
gtk_table_set_row_spacing(GTK_TABLE(basetable),2,4);
gtk_table_attach(GTK_TABLE(basetable),label,0,1,4,5,GTK_FILL,0,2,0);
gtk_table_attach(GTK_TABLE(basetable),slider,1,2,4,5,GTK_FILL|GTK_EXPAND,GTK_FILL|GTK_EXPAND,2,0);
- gtk_table_attach(GTK_TABLE(basetable),readout1,2,3,4,5,GTK_FILL,0,0,0);
- gtk_table_attach(GTK_TABLE(basetable),readout2,3,4,4,5,GTK_FILL,0,0,0);
+ gtk_table_attach(GTK_TABLE(basetable),readout0,2,3,4,5,GTK_FILL,0,0,0);
+ gtk_table_attach(GTK_TABLE(basetable),readout1,3,4,4,5,GTK_FILL,0,0,0);
}
@@ -854,27 +889,28 @@
GtkWidget *label=gtk_label_new(NULL);
gtk_widget_set_name(label,"scalemarker");
- bars[i].readoutu=readout_new(" +0");
- bars[i].readouto=readout_new(" +0");
- bars[i].slider=multibar_new(14,labels,levels,2,HI_DECAY|LO_DECAY|LO_ATTACK);
- bars[i].number=i;
- bars[i].label=label;
+ ps->bars[i].readoutu=readout_new(" +0");
+ ps->bars[i].readouto=readout_new(" +0");
+ ps->bars[i].slider=multibar_new(14,labels,levels,2,HI_DECAY|LO_DECAY|LO_ATTACK);
+ ps->bars[i].number=i;
+ ps->bars[i].mp=ps;
+ ps->bars[i].label=label;
- multibar_callback(MULTIBAR(bars[i].slider),slider_change,bars+i);
- multibar_thumb_set(MULTIBAR(bars[i].slider),-140.,0);
- multibar_thumb_set(MULTIBAR(bars[i].slider),0.,1);
- multibar_thumb_bounds(MULTIBAR(bars[i].slider),-140,0);
- multibar_thumb_increment(MULTIBAR(bars[i].slider),1.,10.);
+ multibar_callback(MULTIBAR(ps->bars[i].slider),slider_change,ps->bars+i);
+ multibar_thumb_set(MULTIBAR(ps->bars[i].slider),-140.,0);
+ multibar_thumb_set(MULTIBAR(ps->bars[i].slider),0.,1);
+ multibar_thumb_bounds(MULTIBAR(ps->bars[i].slider),-140,0);
+ multibar_thumb_increment(MULTIBAR(ps->bars[i].slider),1.,10.);
gtk_misc_set_alignment(GTK_MISC(label),1,.5);
gtk_table_attach(GTK_TABLE(slidertable),label,0,1,i+1,i+2,
GTK_FILL,0,10,0);
- gtk_table_attach(GTK_TABLE(slidertable),bars[i].readoutu,1,2,i+1,i+2,
+ gtk_table_attach(GTK_TABLE(slidertable),ps->bars[i].readoutu,1,2,i+1,i+2,
0,0,0,0);
- gtk_table_attach(GTK_TABLE(slidertable),bars[i].slider,2,3,i+1,i+2,
+ gtk_table_attach(GTK_TABLE(slidertable),ps->bars[i].slider,2,3,i+1,i+2,
GTK_FILL|GTK_EXPAND,GTK_EXPAND,0,0);
- gtk_table_attach(GTK_TABLE(slidertable),bars[i].readouto,3,4,i+1,i+2,
+ gtk_table_attach(GTK_TABLE(slidertable),ps->bars[i].readouto,3,4,i+1,i+2,
0,0,0,0);
}
@@ -882,17 +918,18 @@
{
GtkWidget *label=gtk_label_new("average");
- bars[multicomp_freqs_max].slider=multibar_slider_new(14,labels,levels,2);
+ ps->bars[multicomp_freqs_max].slider=multibar_slider_new(14,labels,levels,2);
- multibar_callback(MULTIBAR(bars[multicomp_freqs_max].slider),average_change,bars+multicomp_freqs_max);
+ multibar_callback(MULTIBAR(ps->bars[multicomp_freqs_max].slider),average_change,
+ master_panel);
- multibar_thumb_set(MULTIBAR(bars[multicomp_freqs_max].slider),-140.,0);
- multibar_thumb_set(MULTIBAR(bars[multicomp_freqs_max].slider),0.,1);
- multibar_thumb_bounds(MULTIBAR(bars[multicomp_freqs_max].slider),-140,0);
+ multibar_thumb_set(MULTIBAR(ps->bars[multicomp_freqs_max].slider),-140.,0);
+ multibar_thumb_set(MULTIBAR(ps->bars[multicomp_freqs_max].slider),0.,1);
+ multibar_thumb_bounds(MULTIBAR(ps->bars[multicomp_freqs_max].slider),-140,0);
gtk_table_attach(GTK_TABLE(slidertable),label,0,2,multicomp_freqs_max+1,multicomp_freqs_max+2,
GTK_FILL,0,0,0);
- gtk_table_attach(GTK_TABLE(slidertable),bars[i].slider,2,3,multicomp_freqs_max+1,multicomp_freqs_max+2,
+ gtk_table_attach(GTK_TABLE(slidertable),ps->bars[i].slider,2,3,multicomp_freqs_max+1,multicomp_freqs_max+2,
GTK_FILL|GTK_EXPAND,GTK_EXPAND,0,0);
gtk_table_set_row_spacing(GTK_TABLE(slidertable),multicomp_freqs_max,10);
}
@@ -901,10 +938,18 @@
subpanel_show_all_but_toplevel(panel);
/* Now unmap the sliders we don't want */
- static_octave(NULL,(gpointer)1);
+ static_octave(NULL,&ps->octave_full);
}
+void compandpanel_create_master(postfish_mainpanel *mp,
+ GtkWidget *windowbutton,
+ GtkWidget *activebutton){
+
+ compandpanel_create(mp,&multi_master_set,windowbutton,activebutton);
+}
+
+
static float **peakfeed=0;
static float **rmsfeed=0;
@@ -922,14 +967,14 @@
if(pull_multicompand_feedback_master(peakfeed,rmsfeed,&bands)==1)
for(i=0;i<bands;i++)
- multibar_set(MULTIBAR(bars[i].slider),rmsfeed[i],peakfeed[i],
+ multibar_set(MULTIBAR(master_panel->bars[i].slider),rmsfeed[i],peakfeed[i],
input_ch,(displayit && multi_master_set.panel_visible));
}
void compandpanel_reset(void){
int i;
for(i=0;i<multicomp_freqs_max;i++)
- multibar_reset(MULTIBAR(bars[i].slider));
+ multibar_reset(MULTIBAR(master_panel->bars[i].slider));
}
Modified: trunk/postfish/compandpanel.h
===================================================================
--- trunk/postfish/compandpanel.h 2004-04-22 22:37:04 UTC (rev 6579)
+++ trunk/postfish/compandpanel.h 2004-04-23 06:10:31 UTC (rev 6580)
@@ -21,14 +21,10 @@
*
*/
-extern void suppresspanel_create(postfish_mainpanel *mp,
- GtkWidget *windowbutton,
- GtkWidget *activebutton);
+extern void compandpanel_create_master (postfish_mainpanel *mp,
+ GtkWidget *windowbutton,
+ GtkWidget *activebutton);
-extern void compandpanel_create(postfish_mainpanel *mp,
- GtkWidget *windowbutton,
- GtkWidget *activebutton);
-
extern void compandpanel_feedback(int displayit);
extern void compandpanel_reset(void);
Modified: trunk/postfish/mainpanel.c
===================================================================
--- trunk/postfish/mainpanel.c 2004-04-22 22:37:04 UTC (rev 6579)
+++ trunk/postfish/mainpanel.c 2004-04-23 06:10:31 UTC (rev 6580)
@@ -977,7 +977,7 @@
}
mainpanel_masterentry(panel,mastertable,"_Crossmix "," c ",GDK_c,0,0);
- mainpanel_masterentry(panel,mastertable,"_Multicomp "," m ",GDK_m,1,compandpanel_create);
+ 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);
mainpanel_masterentry(panel,mastertable,"_Reverb "," r ",GDK_r,4,0);
Modified: trunk/postfish/mainpanel.h
===================================================================
--- trunk/postfish/mainpanel.h 2004-04-22 22:37:04 UTC (rev 6579)
+++ trunk/postfish/mainpanel.h 2004-04-23 06:10:31 UTC (rev 6580)
@@ -30,6 +30,7 @@
#include "eqpanel.h"
#include "compandpanel.h"
#include "singlepanel.h"
+#include "suppresspanel.h"
#include "limitpanel.h"
#include "mutedummy.h"
Modified: trunk/postfish/version.h
===================================================================
--- trunk/postfish/version.h 2004-04-22 22:37:04 UTC (rev 6579)
+++ trunk/postfish/version.h 2004-04-23 06:10:31 UTC (rev 6580)
@@ -1,2 +1,2 @@
#define VERSION "$Id$ "
-/* DO NOT EDIT: Automated versioning hack [Thu Apr 22 18:25:14 EDT 2004] */
+/* DO NOT EDIT: Automated versioning hack [Fri Apr 23 02:09:14 EDT 2004] */
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list