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

Method checkSampleRate

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

Source from the content-addressed store, hash-verified

27}
28
29int ModemUSB::checkSampleRate(long long sampleRate, int /* audioSampleRate */) {
30 if (sampleRate < MIN_BANDWIDTH) {
31 return MIN_BANDWIDTH;
32 }
33 if (sampleRate % 2 == 0) {
34 return (int)sampleRate;
35 }
36 return (int)(sampleRate+1);
37}
38
39int ModemUSB::getDefaultSampleRate() {
40 return 5400;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected