Fixed CW demod + fixed bug in sinks

This commit is contained in:
Ryzerth 2021-02-18 02:47:19 +01:00
parent 4174554260
commit d0bea51cd4
4 changed files with 4 additions and 3 deletions

View File

@ -73,6 +73,7 @@ public:
if (i == devId) {
devListId = devices.size();
defaultDev = devListId;
_stream->setSampleRate(dev.sampleRates[0]);
}
dev.srId = 0;

View File

@ -79,7 +79,7 @@ public:
void menuHandler() {}
static SinkManager::Sink* create(SinkManager::Stream* stream, std::string streamName, void* ctx) {
stream->srChange.emit(48000);
stream->setSampleRate(48000);
return new SinkManager::NullSink(stream);
}

View File

@ -170,7 +170,7 @@ private:
const float bwMax = 500;
const float bwMin = 100;
const float bbSampRate = 500;
const float bbSampRate = 6000;
std::string uiPrefix;
float snapInterval = 10;

View File

@ -92,7 +92,7 @@ public:
resamp.stop();
}
audioSampRate = sampleRate;
float audioBW = std::min<float>(audioSampRate / 2.0f, 16000.0f);
float audioBW = std::min<float>(audioSampRate / 2.0f, bw / 2.0f);
resamp.setOutSampleRate(audioSampRate);
win.setSampleRate(bbSampRate * resamp.getInterpolation());
win.setCutoff(audioBW);