From 5daa4357a2f405cb0e977f4f54da8838ffaf2b51 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 22 Jan 2025 14:54:00 +0800 Subject: [PATCH] longer history --- sndlock.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sndlock.cpp b/sndlock.cpp index 1380272..3edd815 100644 --- a/sndlock.cpp +++ b/sndlock.cpp @@ -29,7 +29,7 @@ static std::atomic shutdown_threads; static std::atomic frequency[SND_PCHAN]; static std::atomic amplitude[SND_PCHAN]; -#define HIST_DEPTH 512 +#define HIST_DEPTH 1024 static std::atomic peak; static std::atomic clipped; @@ -222,7 +222,7 @@ static void dsp_thread() li_principal[j] = principal; if(!li_hist_hold[j]) { li_count[j]++; - if(li_count[j] == 200) { + if(li_count[j] == 600) { li_count[j] = 0; std::lock_guard guard(li_hist_mutex); std::memmove(&li_hist_mag[j][0], &li_hist_mag[j][1], (HIST_DEPTH-1)*sizeof(float)); @@ -325,7 +325,7 @@ int main(int argc, char* argv[]) std::atexit(glfwTerminate); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); - static GLFWwindow *window = glfwCreateWindow(1024, 1370, "Soundlocker", nullptr, nullptr); + static GLFWwindow *window = glfwCreateWindow(1300, 1370, "Soundlocker", nullptr, nullptr); if(window == nullptr) { std::cerr << "failed to create GLFW window\n"; return 1;