From: drowe67 Date: Sat, 20 Dec 2014 00:04:47 +0000 (+0000) Subject: added scaling to samples if out of sync, thanks Alex X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=6946749606006615ad29085583f28ac4b4366312;p=freetel-svn-tracking.git added scaling to samples if out of sync, thanks Alex git-svn-id: https://svn.code.sf.net/p/freetel/code@1978 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/codec2-dev/src/freedv_api.c b/codec2-dev/src/freedv_api.c index 70258b24..921d2f0d 100644 --- a/codec2-dev/src/freedv_api.c +++ b/codec2-dev/src/freedv_api.c @@ -291,7 +291,8 @@ int freedv_rx(struct freedv *f, short speech_out[], short demod_in[]) { float rxdata[FDMDV_MAX_SAMPLES_PER_FRAME]; int i; - for(i=0; inin; i++) rxdata[i] = (float)demod_in[i]/FDMDV_SCALE; + for(i=0; inin; i++) + rxdata[i] = (float)demod_in[i]/FDMDV_SCALE; return freedv_floatrx(f, speech_out, rxdata); @@ -404,7 +405,7 @@ int freedv_floatrx(struct freedv *f, short speech_out[], float demod_in[]) { /* if not in sync pass through analog samples */ /* this lets us "hear" whats going on, e.g. during tuning */ for(i=0; i