Initial AudioSink thread base and recoring preference

This commit is contained in:
Charles J. Cliffe
2017-09-24 23:50:08 -04:00
parent 927d727a16
commit a398bc57f1
8 changed files with 150 additions and 1 deletions
+20
View File
@@ -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");