From 6f1c5203f14f82b6a10c9756ef1dc39bc8631ec0 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Sat, 30 Oct 2021 10:12:07 -0400 Subject: remove gui (now in stmdspgui repo) --- gui/demos/2_iir_echo.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 gui/demos/2_iir_echo.cpp (limited to 'gui/demos/2_iir_echo.cpp') diff --git a/gui/demos/2_iir_echo.cpp b/gui/demos/2_iir_echo.cpp deleted file mode 100644 index acb5c5d..0000000 --- a/gui/demos/2_iir_echo.cpp +++ /dev/null @@ -1,24 +0,0 @@ -Sample *process_data(Samples samples) -{ - constexpr unsigned int size = samples.size(); - constexpr unsigned int D = 2000; - - float alpha = readalt() / 4095.; - - static Sample output[size]; - static Sample prev[D]; // prev[0] = output[0 - D] - - // Do calculations with previous output - for (unsigned int i = 0; i < D; i++) - output[i] = samples[i] + alpha * (prev[i] - 2048); - - // Do calculations with current samples - for (unsigned int i = D; i < size; i++) - output[i] = samples[i] + alpha * (output[i - D] - 2048); - - // Save outputs for next computation - for (unsigned int i = 0; i < D; i++) - prev[i] = output[size - (D - i)]; - - return output; -} -- cgit v1.2.3