From 7d24c22e1eb5285510c4bdb960ced992313a288c Mon Sep 17 00:00:00 2001 From: Tobias Hienzsch Date: Mon, 12 Feb 2024 01:41:15 +0100 Subject: [PATCH] Improve hades tests --- lib/grit/eurorack/hades_test.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/grit/eurorack/hades_test.cpp b/lib/grit/eurorack/hades_test.cpp index 6afd4ea..a8713e0 100644 --- a/lib/grit/eurorack/hades_test.cpp +++ b/lib/grit/eurorack/hades_test.cpp @@ -1,14 +1,25 @@ #include "hades.hpp" #include +#include #include +#include +#include + TEST_CASE("grit/audio/eurorack: Hades") { static constexpr auto sampleRate = 96'000.0F; static constexpr auto blockSize = 32; - auto input = etl::array{}; + auto input = [] { + auto buf = etl::array{}; + auto rng = etl::xoshiro128plusplus{Catch::getSeed()}; + auto dist = etl::uniform_real_distribution{-1.0F, 1.0F}; + etl::generate(buf.begin(), buf.end(), [&] { return dist(rng); }); + return buf; + }(); + auto output = etl::array{}; auto const buffer = grit::Hades::Buffer{ .input = grit::StereoBlock{ input.data(), blockSize},