Commit a839f47f authored by Monty Montgomery's avatar Monty Montgomery

subbander end-of-frame tracker was not being properly initialized



git-svn-id: https://svn.xiph.org/trunk/postfish@6576 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent 4737bf36
......@@ -476,7 +476,6 @@ time_linkage *freq_read(time_linkage *in, freq_state *f,
break;
case 3: /* we've pushed out EOF already */
f->out.samples=0;
return &f->out;
}
/* finish up the state feedabck */
......
......@@ -302,7 +302,7 @@ static void over_compand(float *lx,float zerocorner,
run_filter(overdB,lx,input_size,lookahead,mode,iir,attack,decay,ps);
if(adj){
float corner_multiplier=(1.-1./(c.over_ratio*.001));
float corner_multiplier=(1.-1./(c.over_ratio/1000.));
if(c.over_softknee){
for(k=0;k<input_size;k++)
adj[k]+=soft_knee(overdB[k]-zerocorner)*corner_multiplier;
......@@ -325,7 +325,7 @@ static void base_compand(float *x,
iir,attack,decay,ps);
if(adj){
float base_multiplier=(1.-1./(c.base_ratio*.001));
float base_multiplier=(1.-1./(c.base_ratio/1000.));
for(k=0;k<input_size;k++)
adj[k]-=(basedB[k]+adj[k])*base_multiplier;
}
......@@ -344,7 +344,7 @@ static void under_compand(float *x,float zerocorner,
iir,attack,decay,ps);
if(adj){
float corner_multiplier=(1./(c.under_ratio*.001)-1.);
float corner_multiplier=(1./(c.under_ratio/1000.)-1.);
if(c.under_softknee){
for(k=0;k<input_size;k++)
adj[k]=soft_knee(zerocorner-underdB[k])*corner_multiplier;
......@@ -356,7 +356,7 @@ static void under_compand(float *x,float zerocorner,
}
static void multicompand_work(void *vs){
return;
multicompand_state *ms=(multicompand_state *)vs;
subband_state *ss=&ms->ss;
int i,j,k,bypass_visible=1;
......
......@@ -233,20 +233,11 @@ 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;
/* XXXX Temporary! Until later plugins can handle mute, we zero out
muted channels here */
for(i=0;i<input_ch;i++)
if((link->active & (1<<i))==0)
memset(link->data[i],0,sizeof(*link->data[i])*input_size);
link=multicompand_read(link);
result|=link->samples;
link=singlecomp_read(link);
......@@ -275,6 +266,7 @@ void *playback_thread(void *dummy){
/************/
if(link->samples>0){
memset(rms,0,sizeof(*rms)*(input_ch+2));
memset(peak,0,sizeof(*peak)*(input_ch+2));
ch=link->channels;
......@@ -373,9 +365,11 @@ void *playback_thread(void *dummy){
/* inform Lord Vader his shuttle is ready */
push_output_feedback(peak,rms);
write(eventpipe[1],"",1);
}
}
if(playback_fd){
......@@ -408,3 +402,4 @@ void output_halt_playback(void){
}
}
......@@ -505,6 +505,7 @@ time_linkage *subband_read(time_linkage *in, subband_state *f,
memset(f->cache1[i],0,sizeof(**f->cache1)*input_size);
memset(f->cache0[i],0,sizeof(**f->cache0)*input_size);
}
f->lap_samples=0;
/* and set up state variables */
/* set the vars to 'active' so that if the first frame is an
......
#define VERSION "$Id$ "
/* DO NOT EDIT: Automated versioning hack [Thu Apr 22 06:37:00 EDT 2004] */
/* DO NOT EDIT: Automated versioning hack [Thu Apr 22 07:19:26 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