diff options
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | src/audio_out/audio_sun_out.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 37232b54b..c0b299ea3 100644 --- a/configure.ac +++ b/configure.ac @@ -1618,6 +1618,12 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ AC_MSG_RESULT($have_sunaudio) AM_CONDITIONAL(HAVE_SUNAUDIO, test "x$have_sunaudio" = "xyes") +if "x$have_sunaudio" = "xyes"; then + dnl NetBSD and OpenBSD don't have this, but check for it + dnl rather than assuming that it doesn't happen elsewhere. + AC_CHECK_MEMBERS([audio_info_t.output_muted]) +fi + dnl --------------------------------------------- dnl IRIX style audio interface diff --git a/src/audio_out/audio_sun_out.c b/src/audio_out/audio_sun_out.c index 93361d2f3..9d9ede32c 100644 --- a/src/audio_out/audio_sun_out.c +++ b/src/audio_out/audio_sun_out.c @@ -807,7 +807,7 @@ static int ao_sun_get_property (ao_driver_t *this_gen, int property) { this->mixer_volume = info.play.gain * 100 / AUDIO_MAX_GAIN; } return this->mixer_volume; -#if !defined(__NetBSD__) /* audio_info.output_muted is missing on NetBSD */ +#ifdef HAVE_AUDIO_INFO_T_OUTPUT_MUTED case AO_PROP_MUTE_VOL: if (ioctl(this->audio_fd, AUDIO_GETINFO, &info) < 0) return 0; @@ -836,7 +836,7 @@ static int ao_sun_set_property (ao_driver_t *this_gen, int property, int value) if (ioctl(this->audio_fd, AUDIO_SETINFO, &info) < 0) return ~value; return value; -#if !defined(__NetBSD__) /* audio_info.output_muted is missing on NetBSD */ +#ifdef HAVE_AUDIO_INFO_T_OUTPUT_MUTED case AO_PROP_MUTE_VOL: info.output_muted = value != 0; if (ioctl(this->audio_fd, AUDIO_SETINFO, &info) < 0) |