mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-09 09:24:57 -04:00
Better initial sample rate setup, remove hard-coded default rate and use device info matching /w fallback
This commit is contained in:
@@ -303,8 +303,10 @@ void AudioThread::setupDevice(int deviceId) {
|
||||
if (deviceSampleRate.find(parameters.deviceId) != deviceSampleRate.end()) {
|
||||
sampleRate = deviceSampleRate[parameters.deviceId];
|
||||
} else {
|
||||
sampleRate = DEFAULT_AUDIO_SAMPLE_RATE;
|
||||
deviceSampleRate[parameters.deviceId] = sampleRate;
|
||||
std::cout << "Error, device sample rate wasn't initialized?" << std::endl;
|
||||
return;
|
||||
// sampleRate = AudioThread::getDefaultAudioSampleRate();
|
||||
// deviceSampleRate[parameters.deviceId] = sampleRate;
|
||||
}
|
||||
|
||||
if (deviceController.find(parameters.deviceId) == deviceController.end()) {
|
||||
|
||||
Reference in New Issue
Block a user