[xiph-cvs] r6581 - trunk/postfish
xiphmont at xiph.org
xiphmont at xiph.org
Tue May 4 21:26:03 PDT 2004
Author: xiphmont
Date: 2004-04-23 02:24:38 -0400 (Fri, 23 Apr 2004)
New Revision: 6581
Modified:
trunk/postfish/compandpanel.c
trunk/postfish/compandpanel.h
trunk/postfish/mainpanel.c
trunk/postfish/multicompand.c
trunk/postfish/version.h
Log:
implement per-channel multicompand panel UIs
next: tie to engine infrastructure
<p><p>Modified: trunk/postfish/compandpanel.c
===================================================================
--- trunk/postfish/compandpanel.c 2004-04-23 06:10:31 UTC (rev 6580)
+++ trunk/postfish/compandpanel.c 2004-04-23 06:24:38 UTC (rev 6581)
@@ -37,6 +37,7 @@
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 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 @@
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,11 +937,38 @@
void compandpanel_create_master(postfish_mainpanel *mp,
GtkWidget *windowbutton,
GtkWidget *activebutton){
-
- compandpanel_create(mp,&multi_master_set,windowbutton,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;
+ /* 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);
+ }
+}
+
+
static float **peakfeed=0;
static float **rmsfeed=0;
Modified: trunk/postfish/compandpanel.h
===================================================================
--- trunk/postfish/compandpanel.h 2004-04-23 06:10:31 UTC (rev 6580)
+++ trunk/postfish/compandpanel.h 2004-04-23 06:24:38 UTC (rev 6581)
@@ -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);
Modified: trunk/postfish/mainpanel.c
===================================================================
--- trunk/postfish/mainpanel.c 2004-04-23 06:10:31 UTC (rev 6580)
+++ trunk/postfish/mainpanel.c 2004-04-23 06:24:38 UTC (rev 6581)
@@ -949,7 +949,7 @@
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);
Modified: trunk/postfish/multicompand.c
===================================================================
--- trunk/postfish/multicompand.c 2004-04-23 06:10:31 UTC (rev 6580)
+++ trunk/postfish/multicompand.c 2004-04-23 06:24:38 UTC (rev 6581)
@@ -74,6 +74,8 @@
} 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 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++)
Modified: trunk/postfish/version.h
===================================================================
--- trunk/postfish/version.h 2004-04-23 06:10:31 UTC (rev 6580)
+++ trunk/postfish/version.h 2004-04-23 06:24:38 UTC (rev 6581)
@@ -1,2 +1,2 @@
#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] */
--- >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