From 9a57296b21a5bc8e1e2f554ce74e982e1ca1678e Mon Sep 17 00:00:00 2001 From: drowe67 Date: Thu, 18 Nov 2010 05:20:55 +0000 Subject: [PATCH] mods to handle LPC orders other than 10, they don't sound much better BTW git-svn-id: https://svn.code.sf.net/p/freetel/code@242 01035d8c-6547-0410-b346-abe4f91aad63 --- codec2/src/codec2.c | 2 +- codec2/src/phase.c | 5 +++-- codec2/src/phase.h | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/codec2/src/codec2.c b/codec2/src/codec2.c index 5d9c1be7..e67f3fba 100644 --- a/codec2/src/codec2.c +++ b/codec2/src/codec2.c @@ -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); diff --git a/codec2/src/phase.c b/codec2/src/phase.c index 4a1cade2..80dfaa25 100644 --- a/codec2/src/phase.c +++ b/codec2/src/phase.c @@ -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 diff --git a/codec2/src/phase.h b/codec2/src/phase.h index 33483208..833bc7cd 100644 --- a/codec2/src/phase.h +++ b/codec2/src/phase.h @@ -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 -- 2.25.1