From 6a7d776c07f0c4aca721d6250be85cd21b2b61fc Mon Sep 17 00:00:00 2001 From: drowe67 Date: Mon, 29 Oct 2012 02:34:12 +0000 Subject: [PATCH] moved memory updates inside 8 to 48 kHz sample rate functions to make calling code cleaner git-svn-id: https://svn.code.sf.net/p/freetel/code@882 01035d8c-6547-0410-b346-abe4f91aad63 --- codec2-dev/src/fdmdv.c | 13 ++++++++++++- codec2-dev/unittest/t48_8.c | 8 ++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/codec2-dev/src/fdmdv.c b/codec2-dev/src/fdmdv.c index 1ded60f1..26c2a7f7 100644 --- a/codec2-dev/src/fdmdv.c +++ b/codec2-dev/src/fdmdv.c @@ -1093,7 +1093,7 @@ void CODEC2_WIN32SUPPORT fdmdv_put_test_bits(struct FDMDV *f, int *sync, makes mistakes when used continuously. So we use it until we have acquired the BPSK pilot, then switch to a more robust "fine" tracking algorithm. If we lose sync we switch back to coarse mode - for fast-requisition of large frequency offsets. + for fast re-acquisition of large frequency offsets. \*---------------------------------------------------------------------------*/ @@ -1337,6 +1337,12 @@ void CODEC2_WIN32SUPPORT fdmdv_8_to_48(float out48k[], float in8k[], int n) } } + + /* update filter memory */ + + for(i=-(FDMDV_OS_TAPS/FDMDV_OS); i<0; i++) + in8k[i] = in8k[i + n]; + } /*---------------------------------------------------------------------------*\ @@ -1365,6 +1371,11 @@ void CODEC2_WIN32SUPPORT fdmdv_48_to_8(float out8k[], float in48k[], int n) for(j=0; j