MCPcopy Create free account
hub / github.com/cjcliffe/CubicSDR / runPFBCH2

Method runPFBCH2

src/sdr/SDRPostThread.cpp:472–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470}
471
472void SDRPostThread::runPFBCH2(SDRThreadIQData *data_in) {
473 bool refreshed = false;
474 if (numChannels != data_in->numChannels || sampleRate != data_in->sampleRate || chanMode != lastChanMode || doRefresh.load()) {
475 numChannels = data_in->numChannels;
476 sampleRate = data_in->sampleRate;
477 initPFBCH2();
478 lastChanMode = 2;
479 refreshed = true;
480 }
481
482 if (refreshed || frequency != data_in->frequency) {
483 frequency = data_in->frequency;
484 updateActiveDemodulators();
485 updateChannels();
486 }
487
488 //push the full data_in into (Main spectrum + waterfall) visual queue:
489 DemodulatorThreadIQDataPtr fullSampleRateIQ = getFullSampleRateIqData(data_in);
490 pushVisualData(fullSampleRateIQ);
491
492 size_t outSize = data_in->data.size() * 2;
493
494 if (outSize > dataOut.capacity()) {
495 dataOut.reserve(outSize);
496 }
497 if (outSize != dataOut.size()) {
498 dataOut.resize(outSize);
499 }
500
501 // Find active demodulators
502 if (!runDemods.empty()) {
503 // Channelize data
504 // firpfbch2 produces [numChannels] interleaved output samples for every [numChannels/2] input samples
505 for (int i = 0, iMax = data_in->data.size(); i < iMax; i += numChannels/2) {
506 firpfbch2_crcf_execute(channelizer2, &data_in->data[i], &dataOut[i*2]);
507 }
508
509 runDemodChannels(chanBw * 2);
510 }
511}

Callers

nothing calls this directly

Calls 5

loadMethod · 0.80
capacityMethod · 0.80
reserveMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected