Commit 563f94fa authored by Monty Montgomery's avatar Monty Montgomery

Implement mute-button infrastructure tie-in

Implement muted channel support/passthrough in declipper

Signal path 'cleanup' in declipper; eliminate any clicks/thumps
  during realtime parameter adjustment

Remaining: realtime burst-CPU demand elimination in FFTW blocksize changes



git-svn-id: https://svn.xiph.org/trunk/postfish@6531 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent 6055550f
......@@ -15,12 +15,12 @@ SRC = main.c mainpanel.c multibar.c readout.c input.c output.c clippanel.c \
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
limit.c limitpanel.c mute.c mutedummy.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
limit.o limitpanel.o mute.o mutedummy.o
GCF = `pkg-config --cflags gtk+-2.0` -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
all:
......
......@@ -326,20 +326,22 @@ void clippanel_create(postfish_mainpanel *mp,
}
void clippanel_feedback(int displayit){
int clip[input_ch],count;
int clip[input_ch],count[input_ch];
float peak[input_ch];
if(pull_declip_feedback(clip,peak,&count)){
if(pull_declip_feedback(clip,peak,count)){
int i;
for(i=0;i<input_ch;i++){
float val[2],zero[2];
val[0]=-1.,zero[0]=-1.;
val[1]=(count?clip[i]*100./count-.1:-1);
val[1]=(count[i]?clip[i]*100./count[i]-.1:-1);
zero[1]=-1.;
multibar_set(MULTIBAR(feedback_bars[i]),zero,val,2,
(displayit && declip_visible));
val[0]=(count?peak[i]:-1);
val[0]=peak[i];
multibar_set(MULTIBAR(trigger_bars[i]),zero,val,1,
(displayit && declip_visible));
......
This diff is collapsed.
......@@ -37,6 +37,7 @@
#include "multicompand.h"
#include "singlecomp.h"
#include "limit.h"
#include "mute.h"
pthread_mutex_t master_mutex=PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
......@@ -55,6 +56,7 @@ int main(int argc, char **argv){
if(multicompand_load())exit(1);
if(singlecomp_load())exit(1);
if(limit_load())exit(1);
if(mute_load())exit(1);
/* look at stdout... do we have a file or device? */
if(!isatty(STDOUT_FILENO)){
......
......@@ -43,12 +43,13 @@ static void meterhold_reset(postfish_mainpanel *p){
}
static void action_zero(GtkWidget *widget,postfish_mainpanel *p){
const char *time=gtk_entry_get_text(GTK_ENTRY(p->entry_a));
off_t cursor=input_time_to_cursor(time);
char buf[14];
off_t cursor;
output_halt_playback();
input_seek(cursor);
readout_set(READOUT(p->cue),(char *)time);
cursor=input_seek(0);
input_cursor_to_time(cursor,buf);
readout_set(READOUT(p->cue),buf);
multibar_reset(MULTIBAR(p->inbar));
multibar_reset(MULTIBAR(p->outbar));
clippanel_reset();
......@@ -60,8 +61,8 @@ static void action_zero(GtkWidget *widget,postfish_mainpanel *p){
}
static void action_end(GtkWidget *widget,postfish_mainpanel *p){
off_t cursor=input_time_to_cursor("9999:59:59.99");
char buf[14];
off_t cursor=input_time_to_cursor("9999:59:59.99");
output_halt_playback();
cursor=input_seek(cursor);
......@@ -248,20 +249,6 @@ static void action_setb(GtkWidget *widget,postfish_mainpanel *p){
}
}
static void action_reseta(GtkWidget *widget,postfish_mainpanel *p){
char time[14];
input_cursor_to_time(0,time);
gtk_entry_set_text(GTK_ENTRY(p->entry_a),time);
input_Acursor_set(0);
}
static void action_resetb(GtkWidget *widget,postfish_mainpanel *p){
char time[14];
input_cursor_to_time(0.,time);
gtk_entry_set_text(GTK_ENTRY(p->entry_b),time);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(p->cue_b),0);
}
static void shutdown(void){
gtk_main_quit ();
}
......@@ -879,13 +866,6 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
G_CALLBACK (action_seta), panel);
gtk_box_pack_start(GTK_BOX(cuebox),temp,0,0,0);
temp=gtk_button_new_with_label("^A");
gtk_widget_add_accelerator (temp, "activate", panel->group, GDK_a, GDK_CONTROL_MASK, 0);
g_signal_connect (G_OBJECT (temp), "clicked",
G_CALLBACK (action_reseta), panel);
gtk_widget_set_name(temp,"reseta");
gtk_box_pack_start(GTK_BOX(cuebox),temp,0,0,0);
panel->cue_b=temp=gtk_toggle_button_new_with_label(" b ");
gtk_widget_add_accelerator (temp, "activate", panel->group, GDK_b, 0, 0);
g_signal_connect (G_OBJECT (temp), "clicked",
......@@ -900,14 +880,6 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
gtk_box_pack_start(GTK_BOX(cuebox),panel->entry_b,0,0,0);
gtk_box_pack_start(GTK_BOX(cuebox),temp,0,0,0);
temp=gtk_button_new_with_label("^B");
gtk_widget_add_accelerator (temp, "activate", panel->group, GDK_b, GDK_CONTROL_MASK, 0);
g_signal_connect (G_OBJECT (temp), "clicked",
G_CALLBACK (action_resetb), panel);
gtk_widget_set_name(temp,"resetb");
gtk_box_pack_start(GTK_BOX(cuebox),temp,0,0,0);
gtk_entry_set_width_chars(GTK_ENTRY(panel->entry_a),13);
gtk_entry_set_width_chars(GTK_ENTRY(panel->entry_b),13);
gtk_entry_set_text(GTK_ENTRY(panel->entry_a)," : :00.00");
......@@ -943,7 +915,7 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
gtk_table_attach_defaults(GTK_TABLE(ttable),conflabel,0,1,6,7);
gtk_table_attach(GTK_TABLE(ttable),confbox,1,2,6,7,
GTK_EXPAND|GTK_FILL,GTK_EXPAND|GTK_FILL,0,3);
gtk_table_attach(GTK_TABLE(ttable),panel,2,3,6,7,0,0,0,0);
gtk_table_attach_defaults(GTK_TABLE(ttable),panel,2,3,6,7);
gtk_box_pack_start(GTK_BOX(confbox),conf,1,1,0);
}
......@@ -975,7 +947,7 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
gtk_table_attach_defaults(GTK_TABLE(channeltable),temp,1,2+input_ch*2,0,1);
}
mainpanel_chentry(panel,channeltable,"Mute ",0,0,0,0);
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,"_Onecomp ",3,0,1,0);
......
......@@ -31,6 +31,7 @@ typedef struct postfish_mainpanel postfish_mainpanel;
#include "compandpanel.h"
#include "singlepanel.h"
#include "limitpanel.h"
#include "mutedummy.h"
struct postfish_mainpanel{
GtkWidget *twirlimage;
......
......@@ -462,7 +462,6 @@ static void draw(GtkWidget *widget,int n){
if(m->thumbs){
int height=widget->allocation.height,i,j;
GdkGC *black_gc=widget->style->black_gc;
int y=height/2-3;
int y0=height/3-1;
int y1=height-3;
......
......@@ -34,6 +34,7 @@
#include "singlecomp.h"
#include "suppress.h"
#include "limit.h"
#include "mute.h"
extern int input_size;
sig_atomic_t playback_active=0;
......@@ -232,8 +233,13 @@ void *playback_thread(void *dummy){
/* get data */
link=input_read();
result=link->samples;
link=mute_read(link);
result|=link->samples;
link=declip_read(link);
result|=link->samples;
link=multicompand_read(link);
result|=link->samples;
link=singlecomp_read(link);
......
......@@ -174,7 +174,6 @@ widget "*.smallreadout" style "small-readout"
widget "*.GtkEntry" style "readout"
widget "*.GtkHScale" style "slider"
widget "*.GtkToggleButton*" style "button-poppy"
widget "*.reset*" style "quitbutton"
widget "*.GtkButton*" style "button-poppy"
widget "*.GtkCheckButton" style "check-poppy"
widget "*.Windowbutton*" style "button-poppy"
......
......@@ -92,6 +92,7 @@ typedef struct time_linkage {
int channels;
int rate;
float **data;
u_int32_t active; /* active channel bitmask */
} time_linkage;
extern pthread_mutex_t master_mutex;
......@@ -107,5 +108,7 @@ extern int eventpipe[2];
extern int input_ch;
extern void mainpanel_go(int n,char *list[],int ch);
extern int mute_channel_muted(u_int32_t bitmap,int i);
#endif
#define VERSION "$Id$ "
/* DO NOT EDIT: Automated versioning hack [Sat Apr 17 01:27:16 EDT 2004] */
/* DO NOT EDIT: Automated versioning hack [Sun Apr 18 18:58:52 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