mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-06-26 20:37:50 +02:00
Fixed a tone of stuff + new features
This commit is contained in:
@ -50,6 +50,12 @@ void SignalPath::start() {
|
||||
fftHandlerSink.start();
|
||||
}
|
||||
|
||||
void SignalPath::stop() {
|
||||
split.stop();
|
||||
reshape.stop();
|
||||
fftHandlerSink.stop();
|
||||
}
|
||||
|
||||
dsp::VFO* SignalPath::addVFO(std::string name, double outSampleRate, double bandwidth, double offset) {
|
||||
if (vfos.find(name) != vfos.end()) {
|
||||
return NULL;
|
||||
|
@ -3,13 +3,13 @@
|
||||
#include <dsp/vfo.h>
|
||||
#include <map>
|
||||
#include <dsp/sink.h>
|
||||
#include <module.h>
|
||||
|
||||
class SignalPath {
|
||||
public:
|
||||
SignalPath();
|
||||
void init(uint64_t sampleRate, int fftRate, int fftSize, dsp::stream<dsp::complex_t>* input, dsp::complex_t* fftBuffer, void fftHandler(dsp::complex_t*,int,void*));
|
||||
void start();
|
||||
void stop();
|
||||
void setSampleRate(double sampleRate);
|
||||
void setFFTRate(double rate);
|
||||
double getSampleRate();
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <signal_path/vfo_manager.h>
|
||||
#include <signal_path/source.h>
|
||||
#include <signal_path/sink.h>
|
||||
#include <module.h>
|
||||
#include <new_module.h>
|
||||
|
||||
namespace sigpath {
|
||||
SDRPP_EXPORT SignalPath signalPath;
|
||||
|
@ -174,18 +174,18 @@ void SinkManager::showVolumeSlider(std::string name, std::string prefix, float w
|
||||
|
||||
float ypos = ImGui::GetCursorPosY();
|
||||
|
||||
if (streams.find(name) == streams.end()) {
|
||||
if (streams.find(name) == streams.end() || name == "") {
|
||||
float dummy = 0.0f;
|
||||
style::beginDisabled();
|
||||
ImGui::SetNextItemWidth(width - height);
|
||||
ImGui::PushID(ImGui::GetID(("sdrpp_dummy_mute_btn_" + name).c_str()));
|
||||
ImGui::PushID(ImGui::GetID(("sdrpp_unmute_btn_" + name).c_str()));
|
||||
ImGui::ImageButton(icons::MUTED, ImVec2(height, height), ImVec2(0, 0), ImVec2(1, 1), btwBorder);
|
||||
ImGui::PopID();
|
||||
ImGui::SameLine();
|
||||
ImGui::SetCursorPosY(ypos - ((height - sliderHeight) / 2.0f));
|
||||
ImGui::SetNextItemWidth(width - height - 8);
|
||||
ImGui::SetCursorPosY(ypos + ((height - sliderHeight) / 2.0f) + btwBorder);
|
||||
ImGui::SliderFloat((prefix + name).c_str(), &dummy, 0.0f, 1.0f, "");
|
||||
ImGui::SetCursorPosY(ypos);
|
||||
style::endDisabled();
|
||||
return;
|
||||
}
|
||||
|
||||
SinkManager::Stream* stream = streams[name];
|
||||
|
@ -13,7 +13,11 @@ VFOManager::VFO::VFO(std::string name, int reference, double offset, double band
|
||||
}
|
||||
|
||||
VFOManager::VFO::~VFO() {
|
||||
dspVFO->stop();
|
||||
gui::waterfall.vfos.erase(name);
|
||||
if (gui::waterfall.selectedVFO == name) {
|
||||
gui::waterfall.selectFirstVFO();
|
||||
}
|
||||
sigpath::signalPath.removeVFO(name);
|
||||
delete wtfVFO;
|
||||
}
|
||||
@ -76,6 +80,7 @@ void VFOManager::deleteVFO(VFOManager::VFO* vfo) {
|
||||
if (name == "") {
|
||||
return;
|
||||
}
|
||||
delete vfo;
|
||||
vfos.erase(name);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user