- return(vorbis_lpc_from_data(work,lpc,n,m));
-}
-
-void lpc_init(lpc_lookup *l,long mapped, int m){
- memset(l,0,sizeof(lpc_lookup));
-
- l->ln=mapped;
- l->m=m;
-
- /* we cheat decoding the LPC spectrum via FFTs */
- drft_init(&l->fft,mapped*2);
-
-}
-
-void lpc_clear(lpc_lookup *l){
- if(l){
- drft_clear(&l->fft);
- }
-}
-
-/* One can do this the long way by generating the transfer function in
- the time domain and taking the forward FFT of the result. The
- results from direct calculation are cleaner and faster.
-
- This version does a linear curve generation and then later
- interpolates the log curve from the linear curve. */
-
-void vorbis_lpc_to_curve(double *curve,double *lpc,double amp,
- lpc_lookup *l){
- int i;
- memset(curve,0,sizeof(double)*l->ln*2);
- if(amp==0)return;
-
- for(i=0;i<l->m;i++){
- curve[i*2+1]=lpc[i]/(4*amp);
- curve[i*2+2]=-lpc[i]/(4*amp);
- }
-
- drft_backward(&l->fft,curve); /* reappropriated ;-) */