Alexei Sorokin 2018-02-25 23:29:27 +00:00 committed by Git OBS Bridge
parent b7590ed3c8
commit a3f4f1604d
2 changed files with 3 additions and 4 deletions

View File

@ -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

View File

@ -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.