aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-14 22:37:27 +0200
committerMax Kellermann <max@duempel.org>2008-10-14 22:37:27 +0200
commit30c86d8ae64ae46ba3bcb1c63e867789feab6dc4 (patch)
treea4d62015186aa48dd71f3749a1d9421803ed4468
parent50e038d1ef339b80154afd32cd78b73656e6bdc6 (diff)
downloadmpd-30c86d8ae64ae46ba3bcb1c63e867789feab6dc4.tar.gz
mpd-30c86d8ae64ae46ba3bcb1c63e867789feab6dc4.tar.xz
mpd-30c86d8ae64ae46ba3bcb1c63e867789feab6dc4.zip
alsa: added #ifdefs around SND_PCM_NO_AUTO_xxx
These macros are not available in older libasound versions (1.0.13 fails, 1.0.16 is ok). Ignore the configuration if the constants are not defined.
-rw-r--r--src/audioOutputs/audioOutput_alsa.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/audioOutputs/audioOutput_alsa.c b/src/audioOutputs/audioOutput_alsa.c
index e2132b9b9..1845f1b76 100644
--- a/src/audioOutputs/audioOutput_alsa.c
+++ b/src/audioOutputs/audioOutput_alsa.c
@@ -86,14 +86,20 @@ alsa_configure(AlsaData *ad, ConfigParam *param)
if ((bp = getBlockParam(param, "period_time")))
ad->period_time = atoi(bp->value);
+#ifdef SND_PCM_NO_AUTO_RESAMPLE
if (!getBoolBlockParam(param, "auto_resample", true))
ad->mode |= SND_PCM_NO_AUTO_RESAMPLE;
+#endif
+#ifdef SND_PCM_NO_AUTO_CHANNELS
if (!getBoolBlockParam(param, "auto_channels", true))
ad->mode |= SND_PCM_NO_AUTO_CHANNELS;
+#endif
+#ifdef SND_PCM_NO_AUTO_FORMAT
if (!getBoolBlockParam(param, "auto_format", true))
ad->mode |= SND_PCM_NO_AUTO_FORMAT;
+#endif
}
static void *alsa_initDriver(mpd_unused struct audio_output *ao,