blob: 7fb916e3e21d3ef28dfbc9060bd32fc4e7606c0c (
plain)
1
2
3
4
5
6
7
8
9
10
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/\.*}
|