From: dttsp Date: Fri, 3 Jun 2005 15:13:30 +0000 (+0000) Subject: Small rearrangement in tx to put compansion before filtering X-Git-Url: https://git.rkrishnan.org/maximilian?a=commitdiff_plain;h=01439076b2f2aa7facbdb57a1eef50da9b2512ca;p=dttsp.git Small rearrangement in tx to put compansion before filtering --- diff --git a/jDttSP/sdr.c b/jDttSP/sdr.c index 9374813..178e991 100644 --- a/jDttSP/sdr.c +++ b/jDttSP/sdr.c @@ -313,12 +313,12 @@ setup_tx(void) { CXBbase(tx.buf.o)); tx.agc.flag = TRUE; - tx.spr.gen = newSpeechProc(0.4, 10.0, CXBbase(tx.buf.o), CXBsize(tx.buf.o)); + tx.spr.gen = newSpeechProc(0.4, 10.0, CXBbase(tx.buf.i), CXBsize(tx.buf.o)); tx.spr.flag = FALSE; tx.cpd.gen = newWSCompander(uni.cpdlen, 0.0, - tx.buf.o); + tx.buf.i); tx.cpd.flag = FALSE; tx.scl.dc = cxzero; @@ -485,7 +485,7 @@ do_tx_meter(CXB buf, int tap) { case PWR: for(i = 0, uni.meter.tx.val[tap] = 1e-20; i < CXBhave(tx.buf.o); i++) uni.meter.tx.val[tap] += Csqrmag(CXBdata(tx.buf.o, i)); - uni.meter.tx.val[tap] /= 2048.0; + uni.meter.tx.val[tap] /= uni.buflen; break; case PKPWR: for(i = 0, uni.meter.tx.val[tap] = 1e-20; i < CXBhave(tx.buf.o); i++) @@ -740,6 +740,9 @@ do_tx_pre(void) { if (tx.dcb.flag) DCBlock(tx.dcb.gen); + if (tx.spr.flag) SpeechProcessor(tx.spr.gen); + if (tx.cpd.flag) WSCompand(tx.cpd.gen); + if (tx.tick == 0) reset_OvSv(tx.filt.ovsv); filter_OvSv(tx.filt.ovsv); @@ -761,9 +764,6 @@ do_tx_post(void) { CXBdata(tx.buf.o, i) = Cscl(CXBdata(tx.buf.o, i), tx.scl.post.val); } - if (tx.spr.flag) SpeechProcessor(tx.spr.gen); - if (tx.cpd.flag) WSCompand(tx.cpd.gen); - if (uni.spec.flag) do_tx_spectrum(tx.buf.o);