From 890f1f5928188bb566ea9f85f8862c61d9a06940 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 26 Oct 2017 09:39:18 +0200 Subject: [PATCH] lib/alsa/Format: move HAVE_ALSA_DSD* definitions from the Alsa output plugin --- src/lib/alsa/Format.hxx | 10 ++++++++++ src/output/plugins/AlsaOutputPlugin.cxx | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lib/alsa/Format.hxx b/src/lib/alsa/Format.hxx index 0fa79e69f..145e4b3fc 100644 --- a/src/lib/alsa/Format.hxx +++ b/src/lib/alsa/Format.hxx @@ -28,6 +28,16 @@ #include +#if SND_LIB_VERSION >= 0x1001c +/* alsa-lib supports DSD since version 1.0.27.1 */ +#define HAVE_ALSA_DSD +#endif + +#if SND_LIB_VERSION >= 0x1001d +/* alsa-lib supports DSD_U32 since version 1.0.29 */ +#define HAVE_ALSA_DSD_U32 +#endif + /** * Convert MPD's #SampleFormat enum to libasound's snd_pcm_format_t * enum. Returns SND_PCM_FORMAT_UNKNOWN if there is no according ALSA diff --git a/src/output/plugins/AlsaOutputPlugin.cxx b/src/output/plugins/AlsaOutputPlugin.cxx index ad9bf7599..3a20ec884 100644 --- a/src/output/plugins/AlsaOutputPlugin.cxx +++ b/src/output/plugins/AlsaOutputPlugin.cxx @@ -44,16 +44,6 @@ #include -#if SND_LIB_VERSION >= 0x1001c -/* alsa-lib supports DSD since version 1.0.27.1 */ -#define HAVE_ALSA_DSD -#endif - -#if SND_LIB_VERSION >= 0x1001d -/* alsa-lib supports DSD_U32 since version 1.0.29 */ -#define HAVE_ALSA_DSD_U32 -#endif - static const char default_device[] = "default"; static constexpr unsigned MPD_ALSA_BUFFER_TIME_US = 500000;