From a3f4f1604db4448f3309accfb774c1839173b37808493187d0eaaa69321f418d Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Sun, 25 Feb 2018 23:29:27 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/pulseaudio-equalizer?expand=0&rev=11 --- 0009-do-not-zero-volume.patch | 5 ++--- pulseaudio-equalizer.changes | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/0009-do-not-zero-volume.patch b/0009-do-not-zero-volume.patch index 8c8fec5..a7a28d7 100644 --- a/0009-do-not-zero-volume.patch +++ b/0009-do-not-zero-volume.patch @@ -1,14 +1,13 @@ -diff -aur a/usr/bin/pulseaudio-equalizer b/usr/bin/pulseaudio-equalizer --- a/usr/bin/pulseaudio-equalizer +++ b/usr/bin/pulseaudio-equalizer -@@ -110,8 +110,14 @@ +@@ -115,8 +115,14 @@ fi # Get sink names and volumes PA_LADSPA_SINK="ladspa_output.$PA_LADSPA_PLUGIN.$PA_LADSPA_LABEL" PA_CURRENT_SINK=$(pacmd stat | sed -e '/Default sink name/!d;s/Default sink name: //g') -PA_CURRENT_VOLUME=$(pacmd list | iconv -c -t ascii | grep -A20 "<$PA_CURRENT_SINK>" | grep -m1 'volume: 0:' | awk '{print $NF}' | sed 's/%//g') -PA_REAL_VOLUME=$((PA_CURRENT_VOLUME*65536/100)) +if [ "$( (echo '4.0'; pulseaudio --version | awk '{print $2}') | sort -V | sed -n '2p' )" != '4.0' ]; then -+ # Version of PulseAudio is superior than 4.0. ++ # The version of PulseAudio is higher than 4.0. + PA_CURRENT_VOLUME=$(pacmd list | iconv -c -t ascii | grep -A20 "<$PA_CURRENT_SINK>" | grep -m1 'volume: front-left:' | awk '{print $3}') + PA_REAL_VOLUME="$PA_CURRENT_VOLUME" +else diff --git a/pulseaudio-equalizer.changes b/pulseaudio-equalizer.changes index a5482c0..8903c0d 100644 --- a/pulseaudio-equalizer.changes +++ b/pulseaudio-equalizer.changes @@ -6,7 +6,7 @@ Sun Feb 25 18:16:05 UTC 2018 - sor.alexei@meowr.ru - Squash 0007-remove-all-preamp.patch into 0002-remove-preamp.patch. - Rebase 0003-force-default-persistence-value.patch, 0004-do-not-crash-on-missing-preset.patch, 0005-window-icon.patch, - 0008-fix-locale-issues.patch. + 0008-fix-locale-issues.patch, 0009-do-not-zero-volume.patch. - Add 0007-pygobject3-port.patch: Port to PyGObject3 and GTK+3. - Unwrap pulseaudio-equalizer-gtk. - Switch to Python3.