Minor tweaks and cleanup

- add functions to access SDRPostThread
This commit is contained in:
Charles J. Cliffe
2015-10-18 12:26:07 -04:00
parent 6ee51711db
commit 67c184262a
6 changed files with 67 additions and 20 deletions
+4 -4
View File
@@ -59,7 +59,7 @@ void DemodulatorThread::run() {
nco_crcf_pll_set_bandwidth(stereoPilot, 0.25f);
// half band filter used for side-band elimination
resamp2_cccf ssbFilt = resamp2_cccf_create(12,-0.25f,60.0f);
resamp2_crcf ssbFilt = resamp2_crcf_create(12,-0.25f,60.0f);
// Automatic IQ gain
iqAutoGain = agc_crcf_create();
@@ -192,13 +192,13 @@ void DemodulatorThread::run() {
switch (demodulatorType.load()) {
case DEMOD_TYPE_LSB:
for (int i = 0; i < bufSize; i++) { // Reject upper band
resamp2_cccf_filter_execute(ssbFilt,(*inputData)[i],&x,&y);
resamp2_crcf_filter_execute(ssbFilt,(*inputData)[i],&x,&y);
ampmodem_demodulate(demodAM, x, &demodOutputData[i]);
}
break;
case DEMOD_TYPE_USB:
for (int i = 0; i < bufSize; i++) { // Reject lower band
resamp2_cccf_filter_execute(ssbFilt,(*inputData)[i],&x,&y);
resamp2_crcf_filter_execute(ssbFilt,(*inputData)[i],&x,&y);
ampmodem_demodulate(demodAM, y, &demodOutputData[i]);
}
break;
@@ -487,7 +487,7 @@ void DemodulatorThread::run() {
firhilbf_destroy(firStereoR2C);
firhilbf_destroy(firStereoC2R);
nco_crcf_destroy(stereoPilot);
resamp2_cccf_destroy(ssbFilt);
resamp2_crcf_destroy(ssbFilt);
outputBuffers.purge();