From ed49ad6f7f4aa6b7911be3d11198ba06bf52fdb8 Mon Sep 17 00:00:00 2001 From: Ryzerth Date: Mon, 20 Jul 2020 20:22:13 +0200 Subject: [PATCH] Fixed humming noise --- src/dsp/source.h | 2 +- src/main_window.cpp | 2 +- src/version.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dsp/source.h b/src/dsp/source.h index bada54c1..faf7e7ce 100644 --- a/src/dsp/source.h +++ b/src/dsp/source.h @@ -73,8 +73,8 @@ namespace dsp { _this->_phase += _this->_phasorSpeed; outBuf[i].i = sin(_this->_phase); outBuf[i].q = cos(_this->_phase); + _this->_phase = fmodf(_this->_phase, 2.0f * 3.1415926535); // TODO: Get a more efficient generator } - _this->_phase = fmodf(_this->_phase, 2.0f * 3.1415926535); if (_this->output.write(outBuf, _this->_blockSize) < 0) { break; }; } delete[] outBuf; diff --git a/src/main_window.cpp b/src/main_window.cpp index 5b5e2e7b..0ebe21ee 100644 --- a/src/main_window.cpp +++ b/src/main_window.cpp @@ -302,7 +302,7 @@ void drawWindow() { ImGui::Combo("##_1_", &srId, soapy.txtSampleRateList.c_str()); } else { - ImGui::Text("%s Samples/s", soapy.txtSampleRateList.c_str()); + ImGui::Text("%.0f Samples/s", soapy.sampleRates[srId]); } ImGui::SameLine(); diff --git a/src/version.h b/src/version.h index fed749b8..77d77072 100644 --- a/src/version.h +++ b/src/version.h @@ -1,3 +1,3 @@ #pragma once -#define VERSION_STR "0.2.1_alpha" \ No newline at end of file +#define VERSION_STR "0.2.2_alpha" \ No newline at end of file