mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-26 13:48:38 -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) {
|
||||
if (sampleRate < 1500) {
|
||||
return 1500;
|
||||
}
|
||||
return sampleRate;
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,9 @@ std::string ModemDigital::getType() {
|
||||
}
|
||||
|
||||
int ModemDigital::checkSampleRate(long long sampleRate, int audioSampleRate) {
|
||||
if (sampleRate < 1500) {
|
||||
return 1500;
|
||||
}
|
||||
return sampleRate;
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,8 @@ Modem *ModemFMStereo::factory() {
|
||||
int ModemFMStereo::checkSampleRate(long long sampleRate, int audioSampleRate) {
|
||||
if (sampleRate < 100000) {
|
||||
return 100000;
|
||||
} else if (sampleRate < 1500) {
|
||||
return 1500;
|
||||
} else {
|
||||
return sampleRate;
|
||||
}
|
||||
|
@ -20,6 +20,9 @@ ModemLSB::~ModemLSB() {
|
||||
}
|
||||
|
||||
int ModemLSB::checkSampleRate(long long sampleRate, int audioSampleRate) {
|
||||
if (sampleRate < 1500) {
|
||||
return 1500;
|
||||
}
|
||||
if (sampleRate % 2 == 0) {
|
||||
return sampleRate;
|
||||
}
|
||||
|
@ -20,6 +20,9 @@ ModemUSB::~ModemUSB() {
|
||||
}
|
||||
|
||||
int ModemUSB::checkSampleRate(long long sampleRate, int audioSampleRate) {
|
||||
if (sampleRate < 1500) {
|
||||
return 1500;
|
||||
}
|
||||
if (sampleRate % 2 == 0) {
|
||||
return sampleRate;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user