bunch of stuff idk i'm tired

This commit is contained in:
Ryzerth
2021-04-22 05:38:25 +02:00
parent 72cbf741b3
commit a4c25280b3
10 changed files with 67 additions and 32 deletions

View File

@@ -73,7 +73,8 @@ public:
}
void enable() {
vfo = sigpath::vfoManager.createVFO(name, ImGui::WaterfallVFO::REF_CENTER, 0, 200000, 200000, 50000, 200000, false);
double bw = gui::waterfall.getBandwidth();
vfo = sigpath::vfoManager.createVFO(name, ImGui::WaterfallVFO::REF_CENTER, std::clamp<double>(savedOffset, -bw/2.0, bw/2.0), 200000, 200000, 50000, 200000, false);
wfmDemod.setVFO(vfo);
fmDemod.setVFO(vfo);
@@ -91,9 +92,8 @@ public:
void disable() {
currentDemod->stop();
savedOffset = vfo->getOffset();
sigpath::vfoManager.deleteVFO(vfo);
//ns.setInput(vfo->output);
//ns.start();
enabled = false;
}
@@ -194,6 +194,7 @@ private:
bool enabled = true;
int demodId = 0;
float audioSampRate = 48000;
double savedOffset;
Demodulator* currentDemod = NULL;
VFOManager::VFO* vfo;