pcm/Dsd2Pcm: use SampleTraits<SampleFormat::DSD>::SILENCE

This commit is contained in:
Max Kellermann 2023-03-06 18:30:01 +01:00
parent 302a571367
commit 7a1b996da9
2 changed files with 7 additions and 10 deletions

View File

@ -172,14 +172,9 @@ void
Dsd2Pcm::Reset() noexcept
{
/* my favorite silence pattern */
fifo.fill(0x69);
fifo.fill(SampleTraits<SampleFormat::DSD>::SILENCE);
fifopos = 0;
/* 0x69 = 01101001
* This pattern "on repeat" makes a low energy 352.8 kHz tone
* and a high energy 1.0584 MHz tone which should be filtered
* out completely by any playback system --> silence
*/
}
inline void

View File

@ -1,8 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
#ifndef MPD_PCM_TRAITS_HXX
#define MPD_PCM_TRAITS_HXX
#pragma once
#include "SampleFormat.hxx"
@ -150,7 +149,10 @@ struct SampleTraits<SampleFormat::DSD> {
static constexpr size_t SAMPLE_SIZE = sizeof(value_type);
/* 0x69 = 01101001
* This pattern "on repeat" makes a low energy 352.8 kHz tone
* and a high energy 1.0584 MHz tone which should be filtered
* out completely by any playback system --> silence
*/
static constexpr value_type SILENCE = 0x69;
};
#endif