From 104075f3e009a75d3d6d5fc880dd4ba44a143216 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 5 Jul 2016 17:55:59 +0200 Subject: [PATCH] PlayerThread: use PcmSilence() in SendSilence() No change for regular PCM, but DSD uses 0x69 now. --- NEWS | 1 + src/PlayerThread.cxx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 4ef12c30e..3260b0142 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ ver 0.19.17 (not yet released) * fix spurious seek error "Failed to allocate silence buffer" * replay gain: fix "replay_gain_handler mixer" setting +* DSD: use 0x69 as silence pattern ver 0.19.16 (2016/06/13) * faster seeking diff --git a/src/PlayerThread.cxx b/src/PlayerThread.cxx index a2bb528b0..69bd0881e 100644 --- a/src/PlayerThread.cxx +++ b/src/PlayerThread.cxx @@ -25,6 +25,7 @@ #include "MusicPipe.hxx" #include "MusicBuffer.hxx" #include "MusicChunk.hxx" +#include "pcm/Silence.hxx" #include "DetachedSong.hxx" #include "system/FatalError.hxx" #include "CrossFade.hxx" @@ -505,7 +506,7 @@ Player::SendSilence() chunk->time = SignedSongTime::Negative(); /* undefined time stamp */ chunk->length = num_frames * frame_size; - memset(chunk->data, 0, chunk->length); + PcmSilence({chunk->data, chunk->length}, play_audio_format.format); Error error; if (!pc.outputs.Play(chunk, error)) {