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

Method checkSampleRate

src/modules/modem/digital/ModemFSK.cpp:19–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19int ModemFSK::checkSampleRate(long long sampleRate, int /* audioSampleRate */) {
20 double minSps = pow(2.0,bps);
21 double nextSps = (double(sampleRate) / double(sps));
22 if (nextSps < minSps) {
23 return 2 * bps * sps;
24 } else {
25 return (int)sampleRate;
26 }
27}
28
29int ModemFSK::getDefaultSampleRate() {
30 return 19200;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected