diff --git a/core/src/core.cpp b/core/src/core.cpp index 7613e364..3bbe3eae 100644 --- a/core/src/core.cpp +++ b/core/src/core.cpp @@ -39,6 +39,7 @@ namespace core { void setInputSampleRate(double samplerate) { // NOTE: Zoom controls won't work + spdlog::info("New DSP samplerate: {0}", samplerate); gui::waterfall.setBandwidth(samplerate); gui::waterfall.setViewOffset(0); gui::waterfall.setViewBandwidth(samplerate); diff --git a/recorder/src/main.cpp b/recorder/src/main.cpp index f97b7ac8..2615cbb0 100644 --- a/recorder/src/main.cpp +++ b/recorder/src/main.cpp @@ -33,11 +33,15 @@ std::string expandString(std::string input) { return std::regex_replace(input, std::regex("//"), "/"); } -std::string genFileName(std::string prefix) { +std::string genFileName(std::string prefix, bool isVfo, std::string name = "") { time_t now = time(0); tm *ltm = localtime(&now); char buf[1024]; - sprintf(buf, "%02d-%02d-%02d_%02d-%02d-%02d.wav", ltm->tm_hour, ltm->tm_min, ltm->tm_sec, ltm->tm_mday, ltm->tm_mon + 1, ltm->tm_year + 1900); + double freq = gui::waterfall.getCenterFrequency();; + if (isVfo) { + freq += gui::waterfall.vfos[name]->generalOffset; + } + sprintf(buf, "_%.0lfHz_%02d-%02d-%02d_%02d-%02d-%02d.wav", freq, ltm->tm_hour, ltm->tm_min, ltm->tm_sec, ltm->tm_mday, ltm->tm_mon + 1, ltm->tm_year + 1900); return prefix + buf; } @@ -159,7 +163,7 @@ private: if (ImGui::Button(CONCAT("Record##_recorder_rec_", name), ImVec2(menuColumnWidth, 0))) { recording = true; samplesWritten = 0; - std::string expandedPath = expandString(recPath + genFileName("/baseband_")); + std::string expandedPath = expandString(recPath + genFileName("/baseband_", false)); sampleRate = sigpath::signalPath.getSampleRate(); basebandWriter = new WavWriter(expandedPath, 16, 2, sigpath::signalPath.getSampleRate()); basebandHandler.start(); @@ -212,7 +216,7 @@ private: if (ImGui::Button(CONCAT("Record##_recorder_rec_", name), ImVec2(menuColumnWidth, 0))) { recording = true; samplesWritten = 0; - std::string expandedPath = expandString(recPath + genFileName("/audio_")); + std::string expandedPath = expandString(recPath + genFileName("/audio_", true, selectedStreamName)); sampleRate = sigpath::sinkManager.getStreamSampleRate(selectedStreamName); audioWriter = new WavWriter(expandedPath, 16, 2, sigpath::sinkManager.getStreamSampleRate(selectedStreamName)); audioHandler.start(); diff --git a/sdrplay_source/src/main.cpp b/sdrplay_source/src/main.cpp index 07d0f67f..bc0eea66 100644 --- a/sdrplay_source/src/main.cpp +++ b/sdrplay_source/src/main.cpp @@ -14,7 +14,7 @@ SDRPP_MOD_INFO { /* Name: */ "sdrplay_source", - /* Description: */ "Airspy source module for SDR++", + /* Description: */ "SDRplay source module for SDR++", /* Author: */ "Ryzerth", /* Version: */ 0, 1, 0, /* Max instances */ 1