From a65f7b1006d445e6deb2882afa97488d7ff108bc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 14 Jan 2020 22:39:54 +0100 Subject: [PATCH] pcm/Dsd2Pcm: use std::fill_n() --- src/pcm/Dsd2Pcm.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pcm/Dsd2Pcm.cxx b/src/pcm/Dsd2Pcm.cxx index 37421804b..aafb524a2 100644 --- a/src/pcm/Dsd2Pcm.cxx +++ b/src/pcm/Dsd2Pcm.cxx @@ -151,8 +151,9 @@ static constexpr auto ctables = GenerateArray(GenerateCtable); void Dsd2Pcm::Reset() noexcept { - for (int i = 0; i < FIFOSIZE; ++i) - fifo[i] = 0x69; /* my favorite silence pattern */ + /* my favorite silence pattern */ + std::fill_n(fifo, std::size(fifo), 0x69); + fifopos = 0; /* 0x69 = 01101001 * This pattern "on repeat" makes a low energy 352.8 kHz tone