diff --git a/audio_sink/src/main.cpp b/audio_sink/src/main.cpp index 7e6b6b1f..93385333 100644 --- a/audio_sink/src/main.cpp +++ b/audio_sink/src/main.cpp @@ -165,6 +165,7 @@ private: unsigned int bufferFrames = sampleRate / 60; RtAudio::StreamOptions opts; opts.flags = RTAUDIO_MINIMIZE_LATENCY; + opts.streamName = _streamName; stereoPacker.setSampleCount(bufferFrames); diff --git a/recorder/src/main.cpp b/recorder/src/main.cpp index 3c7f44b6..f97b7ac8 100644 --- a/recorder/src/main.cpp +++ b/recorder/src/main.cpp @@ -26,6 +26,7 @@ SDRPP_MOD_INFO { /* Max instances */ -1 }; +ConfigManager config; std::string expandString(std::string input) { input = std::regex_replace(input, std::regex("%ROOT%"), options::opts.root); @@ -313,6 +314,10 @@ MOD_EXPORT void _INIT_() { spdlog::error("Could not create recordings directory"); } } + json def = json({}); + config.setPath(options::opts.root + "/radio_config.json"); + config.load(def); + config.enableAutoSave(); } MOD_EXPORT ModuleManager::Instance* _CREATE_INSTANCE_(std::string name) { @@ -324,5 +329,6 @@ MOD_EXPORT void _DELETE_INSTANCE_(ModuleManager::Instance* inst) { } MOD_EXPORT void _END_(RecorderContext_t* ctx) { - + config.disableAutoSave(); + config.save(); } \ No newline at end of file