Commit 30c86d8a authored by Max Kellermann's avatar Max Kellermann

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.
parent 50e038d1
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment