From 8f9b3cbf0ea7ec7e5e8c89d322a4be44a408ff22 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 17 Jun 2019 12:28:48 +0200 Subject: [PATCH] pcm/Dop: add separate dsd_buffer for DSD_U16/32 The dop_buffer will be moved out soon. --- src/pcm/Export.cxx | 4 ++-- src/pcm/Export.hxx | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/pcm/Export.cxx b/src/pcm/Export.cxx index 48171b694..38bd5241d 100644 --- a/src/pcm/Export.cxx +++ b/src/pcm/Export.cxx @@ -158,12 +158,12 @@ PcmExport::Export(ConstBuffer data) noexcept #ifdef ENABLE_DSD if (dsd_u16) - data = Dsd8To16(dop_buffer, channels, + data = Dsd8To16(dsd_buffer, channels, ConstBuffer::FromVoid(data)) .ToVoid(); if (dsd_u32) - data = Dsd8To32(dop_buffer, channels, + data = Dsd8To32(dsd_buffer, channels, ConstBuffer::FromVoid(data)) .ToVoid(); diff --git a/src/pcm/Export.hxx b/src/pcm/Export.hxx index ad58651ae..8dfee34b6 100644 --- a/src/pcm/Export.hxx +++ b/src/pcm/Export.hxx @@ -41,6 +41,13 @@ class PcmExport { PcmBuffer order_buffer; #ifdef ENABLE_DSD + /** + * The buffer is used to convert DSD samples to DSD_U16 or DSD_U32. + * + * @see #dsd_u16, #dsd_u32 + */ + PcmBuffer dsd_buffer; + /** * The buffer is used to convert DSD samples to the * DoP format.