Lines Matching defs:frame_size
64 int frame_size;
85 EXPORT SpeexDecorrState *speex_decorrelate_new(int rate, int channels, int frame_size)
91 st->frame_size = frame_size;
93 st->psy = vorbis_psy_init(rate, 2*frame_size);
94 spx_drft_init(&st->lookup, 2*frame_size);
95 st->wola_mem = speex_alloc(frame_size*sizeof(float));
96 st->curve = speex_alloc(frame_size*sizeof(float));
98 st->y = speex_alloc(frame_size*sizeof(float));
100 st->buff = speex_alloc(channels*2*frame_size*sizeof(float));
107 st->vorbis_win = speex_alloc((2*frame_size+20)*sizeof(float));
108 for (i=0;i<2*frame_size;i++)
109 st->vorbis_win[i] = sin(.5*M_PI* sin(M_PI*i/(2*frame_size))*sin(M_PI*i/(2*frame_size)) );
155 int N=2*st->frame_size;
166 buff = st->buff+ch*2*st->frame_size;
172 for (i=0;i<st->frame_size;i++)
173 buff[i] = buff[i+st->frame_size];
174 for (i=0;i<st->frame_size;i++)
175 buff[i+st->frame_size] = in[i*st->channels+ch];
177 x = buff+st->frame_size;
187 for (i=0;i<st->frame_size;i++)
189 st->y[i] = alpha*(x[i-ALLPASS_ORDER+order]-beta*x[i-ALLPASS_ORDER+order-1])*st->vorbis_win[st->frame_size+i+order]
190 + x[i-ALLPASS_ORDER]*st->vorbis_win[st->frame_size+i]
194 st->y[i] *= st->vorbis_win[st->frame_size+i];
216 for (i=0;i<st->frame_size;i++)
232 for (i=0;i<2*st->frame_size;i++)
237 for (i=1;i<st->frame_size;i++)
250 frame[2*st->frame_size-1] = coef*uni_rand(&st->seed)*sqrt(.1+st->curve[st->frame_size-1]);
252 for (i=0;i<2*st->frame_size;i++)
256 for (i=0;i<st->frame_size;i++)
260 st->wola_mem[i] = frame[i+st->frame_size];