Skip to content

Commit d6a79fd

Browse files
monstaraveit65
authored andcommitted
require PulseAudio 5.0 and drop some old code
1 parent 99d6d9c commit d6a79fd

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

backends/pulse/pulse-device.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -260,15 +260,9 @@ pulse_device_update (PulseDevice *device, const pa_card_info *info)
260260
g_return_if_fail (PULSE_IS_DEVICE (device));
261261
g_return_if_fail (info != NULL);
262262

263-
#if PA_CHECK_VERSION (5, 0, 0)
264263
if G_LIKELY (info->active_profile2 != NULL)
265264
pulse_device_switch_set_active_profile_by_name (device->priv->pswitch,
266265
info->active_profile2->name);
267-
#else
268-
if G_LIKELY (info->active_profile != NULL)
269-
pulse_device_switch_set_active_profile_by_name (device->priv->pswitch,
270-
info->active_profile->name);
271-
#endif
272266
}
273267

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

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

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

420409
profile = pulse_device_profile_new (p_info->name,
421410
p_info->description,

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ AC_SUBST(HAVE_NULL)
113113
# -----------------------------------------------------------------------
114114
# PulseAudio
115115
# -----------------------------------------------------------------------
116-
PA_REQUIRED_VERSION=2.0.0
116+
PA_REQUIRED_VERSION=5.0.0
117117

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

0 commit comments

Comments
 (0)