From 30c86d8ae64ae46ba3bcb1c63e867789feab6dc4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 14 Oct 2008 22:37:27 +0200 Subject: 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. --- src/audioOutputs/audioOutput_alsa.c | 6 ++++++ 1 file changed, 6 insertions(+) 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, -- cgit v1.2.3