From 11e5d63806fdac46526a3fc0c84d31ca8a0df5d121655d36381ff33ef43cbc6e Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Wed, 29 Apr 2015 23:23:48 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/pulseaudio-equalizer?expand=0&rev=7 --- 0009-do-not-zero-volume.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/0009-do-not-zero-volume.patch b/0009-do-not-zero-volume.patch index 6048952..8c8fec5 100644 --- a/0009-do-not-zero-volume.patch +++ b/0009-do-not-zero-volume.patch @@ -7,7 +7,7 @@ diff -aur a/usr/bin/pulseaudio-equalizer b/usr/bin/pulseaudio-equalizer 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 '1p' )" = '4.0' ]; then ++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. + 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"