From 439a05d8c3c31ff4751a03dba69dfb96321a83e2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 6 Sep 2014 02:30:57 +0200 Subject: audio/out: remove old things Remove the unnecessary indirection through ao fields. Also fix the inverted result of AOCONTROL_HAS_TEMP_VOLUME. Hopefully the change is equivalent. But actually, it looks like the old code did it wrong. --- audio/mixer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'audio/mixer.c') diff --git a/audio/mixer.c b/audio/mixer.c index b19a2c6438..74c82f252c 100644 --- a/audio/mixer.c +++ b/audio/mixer.c @@ -248,7 +248,7 @@ static void probe_softvol(struct mixer *mixer) if (mixer->opts->softvol == SOFTVOL_AUTO) { // No system-wide volume => fine with AO volume control. mixer->softvol = - ao_control(mixer->ao, AOCONTROL_HAS_TEMP_VOLUME, 0) != 1 || + ao_control(mixer->ao, AOCONTROL_HAS_SOFT_VOLUME, 0) != 1 && ao_control(mixer->ao, AOCONTROL_HAS_PER_APP_VOLUME, 0) != 1; } else { mixer->softvol = mixer->opts->softvol == SOFTVOL_YES; @@ -283,7 +283,7 @@ static void restore_volume(struct mixer *mixer) mixer->driver = mixer->softvol ? "softvol" : ao_get_name(ao); bool restore = - mixer->softvol || ao_control(ao, AOCONTROL_HAS_TEMP_VOLUME, 0) == 1; + mixer->softvol || ao_control(ao, AOCONTROL_HAS_SOFT_VOLUME, 0) == 1; // Restore old parameters if volume won't survive reinitialization. // But not if volume scale is possibly different. -- cgit v1.2.3