Skip to content
Permalink
Browse files

require PulseAudio 5.0 and drop some old code

  • Loading branch information...
monsta authored and raveit65 committed May 18, 2018
1 parent 99d6d9c commit d6a79fd134a9bf15654b91657621ea25f4edc1a2
Showing with 1 addition and 12 deletions.
  1. +0 −11 backends/pulse/pulse-device.c
  2. +1 −1 configure.ac
@@ -260,15 +260,9 @@ pulse_device_update (PulseDevice *device, const pa_card_info *info)
g_return_if_fail (PULSE_IS_DEVICE (device));
g_return_if_fail (info != NULL);

#if PA_CHECK_VERSION (5, 0, 0)
if G_LIKELY (info->active_profile2 != NULL)
pulse_device_switch_set_active_profile_by_name (device->priv->pswitch,
info->active_profile2->name);
#else
if G_LIKELY (info->active_profile != NULL)
pulse_device_switch_set_active_profile_by_name (device->priv->pswitch,
info->active_profile->name);
#endif
}

void
@@ -404,18 +398,13 @@ pulse_device_load (PulseDevice *device, const pa_card_info *info)
for (i = 0; i < info->n_profiles; i++) {
PulseDeviceProfile *profile;

#if PA_CHECK_VERSION (5, 0, 0)
pa_card_profile_info2 *p_info = info->profiles2[i];

/* PulseAudio 5.0 includes a new pa_card_profile_info2 which only
* differs in the new available flag, we use it not to include profiles
* which are unavailable */
if (p_info->available == 0)
continue;
#else
/* The old profile list is an array of structs, not pointers */
pa_card_profile_info *p_info = &info->profiles[i];
#endif

profile = pulse_device_profile_new (p_info->name,
p_info->description,
@@ -113,7 +113,7 @@ AC_SUBST(HAVE_NULL)
# -----------------------------------------------------------------------
# PulseAudio
# -----------------------------------------------------------------------
PA_REQUIRED_VERSION=2.0.0
PA_REQUIRED_VERSION=5.0.0

AC_ARG_ENABLE([pulseaudio],
AS_HELP_STRING([--enable-pulseaudio],

0 comments on commit d6a79fd

Please sign in to comment.
You can’t perform that action at this time.