mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-26 13:48:38 -05:00
Deprecate offset setting in session to avoid device conflict
Possible fix for session loading memory leak; may sometimes buffer IQ data to demodulators loaded outside of the current center and bandwidth that should be inactive.
This commit is contained in:
parent
f86950b334
commit
6e20f11680
@ -645,7 +645,6 @@ void AppFrame::saveSession(std::string fileName) {
|
||||
DataNode *header = s.rootNode()->newChild("header");
|
||||
*header->newChild("version") = std::string(CUBICSDR_VERSION);
|
||||
*header->newChild("center_freq") = wxGetApp().getFrequency();
|
||||
*header->newChild("offset") = wxGetApp().getOffset();
|
||||
|
||||
DataNode *demods = s.rootNode()->newChild("demodulators");
|
||||
|
||||
@ -684,14 +683,11 @@ bool AppFrame::loadSession(std::string fileName) {
|
||||
|
||||
std::string version(*header->getNext("version"));
|
||||
long long center_freq = *header->getNext("center_freq");
|
||||
long long offset = *header->getNext("offset");
|
||||
|
||||
std::cout << "Loading " << version << " session file" << std::endl;
|
||||
std::cout << "\tCenter Frequency: " << center_freq << std::endl;
|
||||
std::cout << "\tOffset: " << offset << std::endl;
|
||||
|
||||
wxGetApp().setFrequency(center_freq);
|
||||
wxGetApp().setOffset(offset);
|
||||
|
||||
DataNode *demodulators = l.rootNode()->getNext("demodulators");
|
||||
|
||||
@ -739,7 +735,7 @@ bool AppFrame::loadSession(std::string fileName) {
|
||||
}
|
||||
|
||||
newDemod->run();
|
||||
|
||||
newDemod->setActive(false);
|
||||
wxGetApp().bindDemodulator(newDemod);
|
||||
|
||||
std::cout << "\tAdded demodulator at frequency " << freq << " type " << type << std::endl;
|
||||
|
@ -79,9 +79,6 @@ bool CubicSDR::OnInit() {
|
||||
devName.append(" [");
|
||||
devName.append((*devs_i)->getSerial());
|
||||
devName.append("]");
|
||||
if (!dev) {
|
||||
dev = (*devs_i);
|
||||
}
|
||||
} else {
|
||||
devName.append(" (In Use?)");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user