mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-04 16:31:15 -05:00
Move minimum frequency check to modem checkSampleRate()
This commit is contained in:
parent
7b301fadc1
commit
407abac8e8
@ -9,6 +9,9 @@ std::string ModemAnalog::getType() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ModemAnalog::checkSampleRate(long long sampleRate, int audioSampleRate) {
|
int ModemAnalog::checkSampleRate(long long sampleRate, int audioSampleRate) {
|
||||||
|
if (sampleRate < 1500) {
|
||||||
|
return 1500;
|
||||||
|
}
|
||||||
return sampleRate;
|
return sampleRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,9 @@ std::string ModemDigital::getType() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ModemDigital::checkSampleRate(long long sampleRate, int audioSampleRate) {
|
int ModemDigital::checkSampleRate(long long sampleRate, int audioSampleRate) {
|
||||||
|
if (sampleRate < 1500) {
|
||||||
|
return 1500;
|
||||||
|
}
|
||||||
return sampleRate;
|
return sampleRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +33,8 @@ Modem *ModemFMStereo::factory() {
|
|||||||
int ModemFMStereo::checkSampleRate(long long sampleRate, int audioSampleRate) {
|
int ModemFMStereo::checkSampleRate(long long sampleRate, int audioSampleRate) {
|
||||||
if (sampleRate < 100000) {
|
if (sampleRate < 100000) {
|
||||||
return 100000;
|
return 100000;
|
||||||
|
} else if (sampleRate < 1500) {
|
||||||
|
return 1500;
|
||||||
} else {
|
} else {
|
||||||
return sampleRate;
|
return sampleRate;
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,9 @@ ModemLSB::~ModemLSB() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ModemLSB::checkSampleRate(long long sampleRate, int audioSampleRate) {
|
int ModemLSB::checkSampleRate(long long sampleRate, int audioSampleRate) {
|
||||||
|
if (sampleRate < 1500) {
|
||||||
|
return 1500;
|
||||||
|
}
|
||||||
if (sampleRate % 2 == 0) {
|
if (sampleRate % 2 == 0) {
|
||||||
return sampleRate;
|
return sampleRate;
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,9 @@ ModemUSB::~ModemUSB() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ModemUSB::checkSampleRate(long long sampleRate, int audioSampleRate) {
|
int ModemUSB::checkSampleRate(long long sampleRate, int audioSampleRate) {
|
||||||
|
if (sampleRate < 1500) {
|
||||||
|
return 1500;
|
||||||
|
}
|
||||||
if (sampleRate % 2 == 0) {
|
if (sampleRate % 2 == 0) {
|
||||||
return sampleRate;
|
return sampleRate;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user