diff options
author | Michal Ratajsky <[email protected]> | 2015-09-26 16:59:13 +0200 |
---|---|---|
committer | Michal Ratajsky <[email protected]> | 2015-09-26 16:59:13 +0200 |
commit | 10a0b2193303063167a297f542c4de0952a4cd25 (patch) | |
tree | bb79ff0560091dc4620d31b90f4d476939fd3ed4 /backends/alsa/alsa-device.c | |
parent | 06b3b936980f2b12aabf4aff64230c86e81e8cff (diff) | |
download | libmatemixer-10a0b2193303063167a297f542c4de0952a4cd25.tar.bz2 libmatemixer-10a0b2193303063167a297f542c4de0952a4cd25.tar.xz |
alsa: Fix FTBFS with old versions of ALSA (fixes #4)
Diffstat (limited to 'backends/alsa/alsa-device.c')
-rw-r--r-- | backends/alsa/alsa-device.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/backends/alsa/alsa-device.c b/backends/alsa/alsa-device.c index f76478f..fb12447 100644 --- a/backends/alsa/alsa-device.c +++ b/backends/alsa/alsa-device.c @@ -24,6 +24,7 @@ #include <alsa/asoundlib.h> #include <libmatemixer/matemixer.h> +#include "alsa-compat.h" #include "alsa-constants.h" #include "alsa-device.h" #include "alsa-element.h" @@ -707,11 +708,13 @@ load_element (AlsaDevice *device, snd_mixer_elem_t *el) gboolean cenum = FALSE; gboolean penum = FALSE; +#if SND_LIB_VERSION >= ALSA_PACK_VERSION (1, 0, 10) /* The enumeration may have a capture or a playback capability. * If it has either both or none, try to guess the more appropriate * direction. */ cenum = snd_mixer_selem_is_enum_capture (el); penum = snd_mixer_selem_is_enum_playback (el); +#endif if (cenum ^ penum) { if (cenum == TRUE) direction = MATE_MIXER_DIRECTION_INPUT; |