mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-27 14:03:15 -04:00
Initial AudioSink thread base and recoring preference
This commit is contained in:
@@ -505,6 +505,14 @@ bool AppConfig::getBookmarksVisible() {
|
||||
return bookmarksVisible.load();
|
||||
}
|
||||
|
||||
void AppConfig::setRecordingPath(std::string recPath) {
|
||||
recordingPath = recPath;
|
||||
}
|
||||
|
||||
std::string AppConfig::getRecordingPath() {
|
||||
return recordingPath;
|
||||
}
|
||||
|
||||
|
||||
void AppConfig::setConfigName(std::string configName) {
|
||||
this->configName = configName;
|
||||
@@ -559,6 +567,9 @@ bool AppConfig::save() {
|
||||
*window_node->newChild("bookmark_visible") = bookmarksVisible.load();
|
||||
}
|
||||
|
||||
DataNode *rec_node = cfg.rootNode()->newChild("recording");
|
||||
*rec_node->newChild("path") = recordingPath;
|
||||
|
||||
DataNode *devices_node = cfg.rootNode()->newChild("devices");
|
||||
|
||||
std::map<std::string, DeviceConfig *>::iterator device_config_i;
|
||||
@@ -741,6 +752,15 @@ bool AppConfig::load() {
|
||||
}
|
||||
}
|
||||
|
||||
if (cfg.rootNode()->hasAnother("recording")) {
|
||||
DataNode *rec_node = cfg.rootNode()->getNext("recording");
|
||||
|
||||
if (rec_node->hasAnother("path")) {
|
||||
DataNode *rec_path = cfg.rootNode()->getNext("path");
|
||||
recordingPath = rec_path->element()->toString();
|
||||
}
|
||||
}
|
||||
|
||||
if (cfg.rootNode()->hasAnother("devices")) {
|
||||
DataNode *devices_node = cfg.rootNode()->getNext("devices");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user