From d481f335b8f24fc27180b83a5bdd65e334905919 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 8 Feb 2024 10:47:05 -0500 Subject: [PATCH] Switch to another std::fill. --- Outputs/Speaker/Implementation/CompoundSource.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Outputs/Speaker/Implementation/CompoundSource.hpp b/Outputs/Speaker/Implementation/CompoundSource.hpp index 1fa8c4ec0..585ab0c1f 100644 --- a/Outputs/Speaker/Implementation/CompoundSource.hpp +++ b/Outputs/Speaker/Implementation/CompoundSource.hpp @@ -10,6 +10,7 @@ #include "SampleSource.hpp" +#include #include #include #include @@ -26,7 +27,7 @@ template class CompoundSource: template class CompoundSourceHolder: public Outputs::Speaker::SampleSource> { public: template void get_samples(std::size_t number_of_samples, std::int16_t *target) { - std::memset(target, 0, sizeof(std::int16_t) * number_of_samples); + std::fill(target, target + number_of_samples, 0); } void set_scaled_volume_range(int16_t, double *, double) {}