pcm: --disable-dsd also disables the dsd2pcm library
This commit is contained in:
parent
052726ed50
commit
3120958a17
@ -464,8 +464,6 @@ libpcm_a_SOURCES = \
|
|||||||
src/pcm/PcmBuffer.cxx src/pcm/PcmBuffer.hxx \
|
src/pcm/PcmBuffer.cxx src/pcm/PcmBuffer.hxx \
|
||||||
src/pcm/PcmExport.cxx src/pcm/PcmExport.hxx \
|
src/pcm/PcmExport.cxx src/pcm/PcmExport.hxx \
|
||||||
src/pcm/PcmConvert.cxx src/pcm/PcmConvert.hxx \
|
src/pcm/PcmConvert.cxx src/pcm/PcmConvert.hxx \
|
||||||
src/pcm/dsd2pcm/dsd2pcm.c src/pcm/dsd2pcm/dsd2pcm.h \
|
|
||||||
src/pcm/PcmDsd.cxx src/pcm/PcmDsd.hxx \
|
|
||||||
src/pcm/PcmDop.cxx src/pcm/PcmDop.hxx \
|
src/pcm/PcmDop.cxx src/pcm/PcmDop.hxx \
|
||||||
src/pcm/Volume.cxx src/pcm/Volume.hxx \
|
src/pcm/Volume.cxx src/pcm/Volume.hxx \
|
||||||
src/pcm/PcmMix.cxx src/pcm/PcmMix.hxx \
|
src/pcm/PcmMix.cxx src/pcm/PcmMix.hxx \
|
||||||
@ -493,6 +491,12 @@ PCM_LIBS = \
|
|||||||
$(SOXR_LIBS) \
|
$(SOXR_LIBS) \
|
||||||
$(SAMPLERATE_LIBS)
|
$(SAMPLERATE_LIBS)
|
||||||
|
|
||||||
|
if ENABLE_DSD
|
||||||
|
libpcm_a_SOURCES += \
|
||||||
|
src/pcm/PcmDsd.cxx src/pcm/PcmDsd.hxx \
|
||||||
|
src/pcm/dsd2pcm/dsd2pcm.c src/pcm/dsd2pcm/dsd2pcm.h
|
||||||
|
endif
|
||||||
|
|
||||||
if HAVE_LIBSAMPLERATE
|
if HAVE_LIBSAMPLERATE
|
||||||
libpcm_a_SOURCES += \
|
libpcm_a_SOURCES += \
|
||||||
src/pcm/LibsamplerateResampler.cxx src/pcm/LibsamplerateResampler.hxx
|
src/pcm/LibsamplerateResampler.cxx src/pcm/LibsamplerateResampler.hxx
|
||||||
|
@ -109,7 +109,9 @@ PcmConvert::Close()
|
|||||||
if (enable_resampler)
|
if (enable_resampler)
|
||||||
resampler.Close();
|
resampler.Close();
|
||||||
|
|
||||||
|
#ifdef ENABLE_DSD
|
||||||
dsd.Reset();
|
dsd.Reset();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
src_format.Clear();
|
src_format.Clear();
|
||||||
@ -120,6 +122,7 @@ PcmConvert::Close()
|
|||||||
ConstBuffer<void>
|
ConstBuffer<void>
|
||||||
PcmConvert::Convert(ConstBuffer<void> buffer, Error &error)
|
PcmConvert::Convert(ConstBuffer<void> buffer, Error &error)
|
||||||
{
|
{
|
||||||
|
#ifdef ENABLE_DSD
|
||||||
if (src_format.format == SampleFormat::DSD) {
|
if (src_format.format == SampleFormat::DSD) {
|
||||||
auto s = ConstBuffer<uint8_t>::FromVoid(buffer);
|
auto s = ConstBuffer<uint8_t>::FromVoid(buffer);
|
||||||
auto d = dsd.ToFloat(src_format.channels, s);
|
auto d = dsd.ToFloat(src_format.channels, s);
|
||||||
@ -131,6 +134,7 @@ PcmConvert::Convert(ConstBuffer<void> buffer, Error &error)
|
|||||||
|
|
||||||
buffer = d.ToVoid();
|
buffer = d.ToVoid();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (enable_resampler) {
|
if (enable_resampler) {
|
||||||
buffer = resampler.Resample(buffer, error);
|
buffer = resampler.Resample(buffer, error);
|
||||||
|
@ -20,13 +20,17 @@
|
|||||||
#ifndef PCM_CONVERT_HXX
|
#ifndef PCM_CONVERT_HXX
|
||||||
#define PCM_CONVERT_HXX
|
#define PCM_CONVERT_HXX
|
||||||
|
|
||||||
#include "PcmDsd.hxx"
|
#include "check.h"
|
||||||
#include "PcmBuffer.hxx"
|
#include "PcmBuffer.hxx"
|
||||||
#include "FormatConverter.hxx"
|
#include "FormatConverter.hxx"
|
||||||
#include "ChannelsConverter.hxx"
|
#include "ChannelsConverter.hxx"
|
||||||
#include "GlueResampler.hxx"
|
#include "GlueResampler.hxx"
|
||||||
#include "AudioFormat.hxx"
|
#include "AudioFormat.hxx"
|
||||||
|
|
||||||
|
#ifdef ENABLE_DSD
|
||||||
|
#include "PcmDsd.hxx"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
template<typename T> struct ConstBuffer;
|
template<typename T> struct ConstBuffer;
|
||||||
@ -39,7 +43,9 @@ class Domain;
|
|||||||
* conversions.
|
* conversions.
|
||||||
*/
|
*/
|
||||||
class PcmConvert {
|
class PcmConvert {
|
||||||
|
#ifdef ENABLE_DSD
|
||||||
PcmDsd dsd;
|
PcmDsd dsd;
|
||||||
|
#endif
|
||||||
|
|
||||||
GluePcmResampler resampler;
|
GluePcmResampler resampler;
|
||||||
PcmFormatConverter format_converter;
|
PcmFormatConverter format_converter;
|
||||||
|
Loading…
Reference in New Issue
Block a user