[xiph-cvs] r6722 - trunk/postfish
xiphmont at xiph.org
xiphmont at xiph.org
Tue May 18 11:49:41 PDT 2004
Author: xiphmont
Date: 2004-05-18 14:49:40 -0400 (Tue, 18 May 2004)
New Revision: 6722
Removed:
trunk/postfish/mutedummy.h
Modified:
trunk/postfish/Makefile
trunk/postfish/main.c
trunk/postfish/mainpanel.c
trunk/postfish/mainpanel.h
trunk/postfish/mix.c
trunk/postfish/mixpanel.c
trunk/postfish/multibar.c
trunk/postfish/output.c
trunk/postfish/version.h
Log:
Raft of small cosmetic bugfixes to mixdown feedback
Plate reverb is now linked in and working
<p><p>Modified: trunk/postfish/Makefile
===================================================================
--- trunk/postfish/Makefile 2004-05-18 07:10:51 UTC (rev 6721)
+++ trunk/postfish/Makefile 2004-05-18 18:49:40 UTC (rev 6722)
@@ -23,12 +23,12 @@
declip.c reconstruct.c multicompand.c windowbutton.c subpanel.c \
feedback.c freq.c eq.c eqpanel.c compandpanel.c subband.c lpc.c \
bessel.c suppresspanel.c suppress.c singlecomp.c singlepanel.c \
- limit.c limitpanel.c mute.c mixpanel.c mix.c reverb.c
+ limit.c limitpanel.c mute.c mixpanel.c mix.c reverb.c reverbpanel.c
OBJ = main.o mainpanel.o multibar.o readout.o input.o output.o clippanel.o \
declip.o reconstruct.o multicompand.o windowbutton.o subpanel.o \
feedback.o freq.o eq.o eqpanel.o compandpanel.o subband.o lpc.o \
bessel.o suppresspanel.o suppress.o singlecomp.o singlepanel.o \
- limit.o limitpanel.o mute.o mixpanel.o mix.o reverb.o
+ limit.o limitpanel.o mute.o mixpanel.o mix.o reverb.o reverbpanel.o
GCF = -DETCDIR=\\\"$(ETCDIR)\\\" `pkg-config --cflags gtk+-2.0` -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
all:
Modified: trunk/postfish/main.c
===================================================================
--- trunk/postfish/main.c 2004-05-18 07:10:51 UTC (rev 6721)
+++ trunk/postfish/main.c 2004-05-18 18:49:40 UTC (rev 6722)
@@ -40,6 +40,7 @@
#include "limit.h"
#include "mute.h"
#include "mix.h"
+#include "reverb.h"
pthread_mutex_t master_mutex=PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
@@ -149,6 +150,7 @@
if(limit_load(OUTPUT_CHANNELS))exit(1);
if(mute_load())exit(1);
if(mix_load(OUTPUT_CHANNELS))exit(1);
+ if(plate_load(OUTPUT_CHANNELS))exit(1);
/* look at stdout... do we have a file or device? */
if(!isatty(STDOUT_FILENO)){
Modified: trunk/postfish/mainpanel.c
===================================================================
--- trunk/postfish/mainpanel.c 2004-05-18 07:10:51 UTC (rev 6721)
+++ trunk/postfish/mainpanel.c 2004-05-18 18:49:40 UTC (rev 6722)
@@ -962,7 +962,7 @@
mainpanel_chentry(panel,channeltable,"_Singlecomp ",2,0,singlepanel_create_channel);
mainpanel_chentry(panel,channeltable,"De_verb ",3,suppresspanel_create_channel,0);
mainpanel_chentry(panel,channeltable,"_EQ ",4,0,eqpanel_create_channel);
- mainpanel_chentry(panel,channeltable,"_Reverb ",5,0,0);
+ mainpanel_chentry(panel,channeltable,"_Reverb ",5,0,reverbpanel_create_channel);
mainpanel_chentry(panel,channeltable,"Atten/Mi_x ",6,attenpanel_create,
mixpanel_create_channel);
@@ -989,17 +989,16 @@
mainpanel_masterentry(panel,mastertable,"_Multicomp "," m ",GDK_m,0,compandpanel_create_master);
mainpanel_masterentry(panel,mastertable,"_Singlecomp "," s ",GDK_s,1,singlepanel_create_master);
- mainpanel_masterentry(panel,mastertable,"_Reverb "," r ",GDK_r,2,0);
- mainpanel_masterentry(panel,mastertable,"_EQ "," e ",GDK_e,3,eqpanel_create_master);
+ mainpanel_masterentry(panel,mastertable,"_EQ "," e ",GDK_e,2,eqpanel_create_master);
+ mainpanel_masterentry(panel,mastertable,"_Reverb "," r ",GDK_r,3,reverbpanel_create_master);
mainpanel_masterentry(panel,mastertable,"_Limit "," l ",GDK_l,4,limitpanel_create);
/* output has three activity buttons not in the main grid */
{
GtkWidget *ww=windowbutton_new("_Output ");
- GtkWidget *std=gtk_toggle_button_new_with_label("o");
- GtkWidget *ply=gtk_toggle_button_new_with_label("p");
- GtkWidget *fil=gtk_toggle_button_new_with_label("f");
+ GtkWidget *std=gtk_toggle_button_new_with_label(" o ");
+ GtkWidget *ply=gtk_toggle_button_new_with_label("play");
GtkWidget *box=gtk_hbox_new(0,0);
GtkWidget *box2=gtk_hbox_new(1,0);
@@ -1011,12 +1010,10 @@
gtk_widget_add_accelerator (std, "activate", panel->group, GDK_o, 0, 0);
gtk_widget_add_accelerator (ply, "activate", panel->group, GDK_p, 0, 0);
- gtk_widget_add_accelerator (fil, "activate", panel->group, GDK_f, 0, 0);
gtk_box_pack_start(GTK_BOX(box),ww,0,0,0);
gtk_box_pack_start(GTK_BOX(box),box2,1,1,2);
gtk_box_pack_start(GTK_BOX(box2),ply,1,1,0);
- gtk_box_pack_start(GTK_BOX(box2),fil,1,1,0);
gtk_table_attach_defaults(GTK_TABLE(mastertable),fw,0,1,6,7);
Modified: trunk/postfish/mainpanel.h
===================================================================
--- trunk/postfish/mainpanel.h 2004-05-18 07:10:51 UTC (rev 6721)
+++ trunk/postfish/mainpanel.h 2004-05-18 18:49:40 UTC (rev 6722)
@@ -33,7 +33,7 @@
#include "suppresspanel.h"
#include "limitpanel.h"
#include "mixpanel.h"
-#include "mutedummy.h"
+#include "reverbpanel.h"
struct postfish_mainpanel{
GtkWidget *twirlimage;
Modified: trunk/postfish/mix.c
===================================================================
--- trunk/postfish/mix.c 2004-05-18 07:10:51 UTC (rev 6721)
+++ trunk/postfish/mix.c 2004-05-18 18:49:40 UTC (rev 6722)
@@ -279,12 +279,17 @@
/* eliminate asynch change possibility */
memcpy(ms.curr,mix_set,sizeof(*mix_set)*input_ch);
- /* a bit of laziness that may actually save time by avoiding
+ /* a bit of laziness that may actually save CPU time by avoiding
special-cases later */
- for(i=0;i<input_ch;i++)
+ for(i=0;i<input_ch;i++){
if(mute_channel_muted(in->active,i))
memset(in->data[i],0,sizeof(**in->data)*input_size);
-
+ if(mute_channel_muted(inA->active,i))
+ memset(inA->data[i],0,sizeof(**inA->data)*input_size);
+ if(mute_channel_muted(inB->active,i))
+ memset(inB->data[i],0,sizeof(**inB->data)*input_size);
+ }
+
/* input-by-input */
for(i=0;i<input_ch;i++){
int feedit=mixpanel_visible[i] && mixpanel_active[i];
@@ -310,10 +315,10 @@
acc+=val;
}
- peak[0][i]=peak[0][i];
rms[0][i]=acc/input_size;
}
+ acc=0.;
if(inA && !mute_channel_muted(inA->active,i)){
memset(mix,0,sizeof(mix));
mixwork(inA->data[i],ms.cacheP[i],ms.cachePP[i],
@@ -322,14 +327,14 @@
bypass=0;
for(j=0;j<input_size;j++){
float val=mix[j]*mix[j];
- if(val>peak[0][i])peak[0][i]=val;
+ if(val>peak[1][i])peak[1][i]=val;
acc+=val;
}
- peak[1][i]=peak[0][i];
rms[1][i]=acc/input_size;
}
+ acc=0.;
if(inB && !mute_channel_muted(inB->active,i)){
memset(mix,0,sizeof(mix));
mixwork(inB->data[i],ms.cacheP[i],ms.cachePP[i],
@@ -338,11 +343,10 @@
bypass=0;
for(j=0;j<input_size;j++){
float val=mix[j]*mix[j];
- if(val>peak[0][i])peak[0][i]=val;
+ if(val>peak[2][i])peak[2][i]=val;
acc+=val;
}
- peak[2][i]=peak[0][i];
rms[2][i]=acc/input_size;
}
}
Modified: trunk/postfish/mixpanel.c
===================================================================
--- trunk/postfish/mixpanel.c 2004-05-18 07:10:51 UTC (rev 6721)
+++ trunk/postfish/mixpanel.c 2004-05-18 18:49:40 UTC (rev 6722)
@@ -120,7 +120,8 @@
static mix_panelsave *mixpanel_create_helper(postfish_mainpanel *mp,
subpanel_generic *panel,
- mix_settings *m){
+ mix_settings *m,
+ int thisch){
int i,j;
@@ -177,9 +178,9 @@
multibar_callback(MULTIBAR(AB->s),AB_slider_change,AB);
multibar_thumb_set(MULTIBAR(AB->s),100,0);
multibar_callback(MULTIBAR(att->s),dB_slider_change,att);
- multibar_thumb_set(MULTIBAR(att->s),0,0);
+ multibar_thumb_set(MULTIBAR(att->s),-3,0);
multibar_callback(MULTIBAR(del->s),ms_slider_change,del);
- multibar_thumb_set(MULTIBAR(del->s),0,0);
+ multibar_thumb_set(MULTIBAR(del->s),-1,0);
ps->place[0]=multibar_new(6,labels_dBn,levels_dBn,0,
LO_ATTACK|LO_DECAY|HI_DECAY);
@@ -316,7 +317,10 @@
G_CALLBACK (toggle_callback),
(gpointer)&m->insert_source[i][2]);
-
+ if(i==0){
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(bM),1);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(bA),1);
+ }
for(j=0;j<OUTPUT_CHANNELS;j++){
char buffer[80];
@@ -329,6 +333,9 @@
G_CALLBACK (toggle_callback),
(gpointer)&m->insert_dest[i][j]);
+ if(thisch%2 == j && i == 0)
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(b),1);
+
gtk_box_pack_start(GTK_BOX(boxB),b,1,1,0);
}
@@ -385,7 +392,7 @@
&mixpanel_visible[i],
buffer,0,i,1);
- mix_panels[i]=mixpanel_create_helper(mp,panel,mix_set+i);
+ mix_panels[i]=mixpanel_create_helper(mp,panel,mix_set+i,i);
}
}
@@ -463,6 +470,8 @@
GTK_FILL|GTK_EXPAND,0,0,0);
gtk_table_attach(GTK_TABLE(table),del->r,3,4,1+i*3,2+i*3,
GTK_FILL|GTK_EXPAND,0,0,0);
+
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(activebutton[i]),1);
}
gtk_box_pack_start(GTK_BOX(panel->subpanel_box),table,1,1,4);
@@ -488,8 +497,8 @@
if(pull_mix_feedback(peakfeed,rmsfeed)==1){
for(j=0;j<input_ch;j++){
for(i=0;i<(MIX_BLOCKS+3);i++){
- float rms[input_ch];
- float peak[input_ch];
+ float rms[input_ch+4];
+ float peak[input_ch+4];
memset(rms,0,sizeof(rms));
memset(peak,0,sizeof(peak));
@@ -506,7 +515,7 @@
peak[3]=todB(peakfeed[2][j])*.5;
multibar_set(MULTIBAR(atten_panel.master[j]),rms,peak,
- 3,(displayit && atten_visible));
+ 4,(displayit && atten_visible));
break;
case 2:
Modified: trunk/postfish/multibar.c
===================================================================
--- trunk/postfish/multibar.c 2004-05-18 07:10:51 UTC (rev 6721)
+++ trunk/postfish/multibar.c 2004-05-18 18:49:40 UTC (rev 6722)
@@ -604,7 +604,7 @@
int i,maxx=0,maxy=0,x,y,xpad;
Multibar *m=MULTIBAR(widget);
- for(i=0;i<m->labels;i++){
+ for(i=0;i<=m->labels;i++){
pango_layout_get_pixel_size(m->layout[i],&x,&y);
if(x>maxx)maxx=x;
Deleted: trunk/postfish/mutedummy.h
===================================================================
--- trunk/postfish/mutedummy.h 2004-05-18 07:10:51 UTC (rev 6721)
+++ trunk/postfish/mutedummy.h 2004-05-18 18:49:40 UTC (rev 6722)
@@ -1,26 +0,0 @@
-/*
- *
- * postfish
- *
- * Copyright (C) 2002-2004 Monty
- *
- * Postfish is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * Postfish is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Postfish; see the file COPYING. If not, write to the
- * Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *
- */
-
-extern void mutedummy_create(postfish_mainpanel *mp,
- GtkWidget **windowbutton,
- GtkWidget **activebutton);
Modified: trunk/postfish/output.c
===================================================================
--- trunk/postfish/output.c 2004-05-18 07:10:51 UTC (rev 6721)
+++ trunk/postfish/output.c 2004-05-18 18:49:40 UTC (rev 6722)
@@ -36,6 +36,7 @@
#include "limit.h"
#include "mute.h"
#include "mix.h"
+#include "reverb.h"
extern int input_size;
extern int input_rate;
@@ -67,6 +68,7 @@
limit_reset(); /* clear any persistent lapping state */
output_reset(); /* clear any persistent lapping state */
mix_reset();
+ plate_reset();
}
typedef struct output_feedback{
@@ -250,20 +252,29 @@
link=eq_read_channel(link);
result|=link->samples;
- link=mix_read(link,0,0);
- result|=link->samples;
+ /* per-channel plate reverb generates more channels than it takes;
+ these are swallowed and mixed immediately by mixdown */
+ {
+ time_linkage *reverbA;
+ time_linkage *reverbB;
+ link=plate_read_channel(link,&reverbA,&reverbB);
+ link=mix_read(link,reverbA,reverbB);
+ result|=link->samples;
+ }
+
link=multicompand_read_master(link);
result|=link->samples;
link=singlecomp_read_master(link);
result|=link->samples;
link=eq_read_master(link);
result|=link->samples;
+ link=plate_read_master(link);
+ result|=link->samples;
if(!result)break;
/************/
-
/* master att */
if(link->samples>0){
float scale=fromdB(master_att/10.);
Modified: trunk/postfish/version.h
===================================================================
--- trunk/postfish/version.h 2004-05-18 07:10:51 UTC (rev 6721)
+++ trunk/postfish/version.h 2004-05-18 18:49:40 UTC (rev 6722)
@@ -1,2 +1,2 @@
#define VERSION "$Id$ "
-/* DO NOT EDIT: Automated versioning hack [Mon May 17 04:15:01 EDT 2004] */
+/* DO NOT EDIT: Automated versioning hack [Mon May 17 17:49:56 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