Can now change input device bandwidth

This commit is contained in:
Charles J. Cliffe
2015-01-11 17:08:16 -05:00
parent 19b569f072
commit ea2627ace6
20 changed files with 189 additions and 112 deletions
+3 -3
View File
@@ -34,18 +34,18 @@ void DemodulatorWorkerThread::threadMain() {
if (filterChanged) {
DemodulatorWorkerThreadResult result(DemodulatorWorkerThreadResult::DEMOD_WORKER_THREAD_RESULT_FILTERS);
result.resamplerRatio = (double) (filterCommand.bandwidth) / (double) filterCommand.inputRate;
result.iqResampleRatio = (double) (filterCommand.bandwidth) / (double) filterCommand.sampleRate;
result.audioResamplerRatio = (double) (filterCommand.audioSampleRate) / (double) filterCommand.bandwidth;
float As = 60.0f; // stop-band attenuation [dB]
result.resampler = msresamp_crcf_create(result.resamplerRatio, As);
result.iqResampler = msresamp_crcf_create(result.iqResampleRatio, As);
result.audioResampler = msresamp_rrrf_create(result.audioResamplerRatio, As);
result.stereoResampler = msresamp_rrrf_create(result.audioResamplerRatio, As);
result.audioSampleRate = filterCommand.audioSampleRate;
result.bandwidth = filterCommand.bandwidth;
result.inputRate = filterCommand.inputRate;
result.sampleRate = filterCommand.sampleRate;
resultQueue->push(result);
}