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

Method demodulate

src/modules/modem/analog/ModemUSB.cpp:43–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void ModemUSB::demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut) {
44 auto *akit = (ModemKitAnalog *)kit;
45
46 initOutputBuffers(akit,input);
47
48 if (!bufSize) {
49
50 return;
51 }
52
53 liquid_float_complex x, y;
54 for (size_t i = 0; i < bufSize; i++) { // Reject lower band
55 nco_crcf_step(ssbShift);
56 nco_crcf_mix_down(ssbShift, input->data[i], &x);
57 iirfilt_crcf_execute(ssbFilt, x, &y);
58 nco_crcf_mix_up(ssbShift, y, &x);
59 float lsb_discard;
60 firhilbf_c2r_execute(c2rFilt, x, &lsb_discard, &demodOutputData[i]);
61 }
62
63 buildAudioOutput(akit, audioOut, true);
64}
65

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected