mods to handle LPC orders other than 10, they don't sound much better BTW
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Thu, 18 Nov 2010 05:20:55 +0000 (05:20 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Thu, 18 Nov 2010 05:20:55 +0000 (05:20 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@242 01035d8c-6547-0410-b346-abe4f91aad63

codec2/src/codec2.c
codec2/src/phase.c
codec2/src/phase.h

index 5d9c1be7a61f588192226f5105a64fa8cf608e9c..e67f3fbad53800211ba85d618c2658e4d04f4971 100644 (file)
@@ -313,7 +313,7 @@ void synthesise_one_frame(CODEC2 *c2, short speech[], MODEL *model, float ak[])
 {
     int     i;
 
-    phase_synth_zero_order(model, ak, &c2->ex_phase);
+    phase_synth_zero_order(model, ak, &c2->ex_phase, LPC_ORD);
     postfilter(model, &c2->bg_est);
     synthesise(c2->Sn_, model, c2->Pn, 1);
 
index 4a1cade2030dde5402cf511148a52f8bfd391eb6..80dfaa25e2638d47bb0c7de285bd55208f714875 100644 (file)
@@ -190,7 +190,8 @@ void aks_to_H(
 void phase_synth_zero_order(
     MODEL *model,
     float  aks[],
-    float *ex_phase             /* excitation phase of fundamental */
+    float *ex_phase,            /* excitation phase of fundamental */
+    int    order
 )
 {
   int   m;
@@ -204,7 +205,7 @@ void phase_synth_zero_order(
   int   b;
 
   G = 1.0;
-  aks_to_H(model,aks,G,H,LPC_ORD);
+  aks_to_H(model, aks, G, H, order);
 
   /* 
      Update excitation fundamental phase track, this sets the position
index 33483208e6e1f4234f9a894975de0f671ceafc3b..833bc7cdcec86560a2ffcf2b9cb1b21f598dd246 100644 (file)
@@ -28,6 +28,7 @@
 #ifndef __PHASE__
 #define __PHASE__
 
-void phase_synth_zero_order(MODEL *model, float aks[], float *ex_phase);
+void phase_synth_zero_order(MODEL *model, float aks[], float *ex_phase, 
+                           int order);
 
 #endif