summaryrefslogtreecommitdiff
path: root/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-current-volume.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-current-volume.patch')
-rw-r--r--pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-current-volume.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-current-volume.patch b/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-current-volume.patch
new file mode 100644
index 000000000..7fb916e3e
--- /dev/null
+++ b/pcr/pulseaudio-equalizer-ladspa/pulseaudio-equalizer-2.7-current-volume.patch
@@ -0,0 +1,11 @@
+--- pulseaudio-equalizer.orig/usr/bin/pulseaudio-equalizer 2014-10-29 15:24:20.000000000 -0500
++++ pulseaudio-equalizer/usr/bin/pulseaudio-equalizer 2015-01-14 23:11:42.872261394 -0500
+@@ -109,7 +109,7 @@
+ # Get sink names and volumes
+ PA_LADSPA_SINK="ladspa_output.$PA_LADSPA_PLUGIN.$PA_LADSPA_LABEL"
+ PA_CURRENT_SINK=$(pacmd stat | grep "Default sink name" | sed 's/Default sink name: //g')
+-PA_CURRENT_VOLUME=$(pacmd list | grep -A20 "<$PA_CURRENT_SINK>" | grep -m1 'volume: 0:' | awk '{print $NF}' | sed 's/%//g')
++PA_CURRENT_VOLUME=$(pacmd list | grep -A20 "<$PA_CURRENT_SINK>" | grep -m1 'volume: front-left:' | awk '{sub(/%/,"",$5); print $5}' | awk '{sub(/,/,"",$1); print $1}')
+ PA_REAL_VOLUME=$((PA_CURRENT_VOLUME*65536/100))
+ PA_REAL_PREAMP_FLOAT=$(echo "$PA_PREAMP*65536" | bc)
+ PA_REAL_PREAMP=${PA_REAL_PREAMP_FLOAT/\.*}