mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-07-12 05:44:08 -04:00
Can now change input device bandwidth
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user