Use hardware volume keys for mixing
authorSergey Matveev <stargrave@stargrave.org>
Tue, 14 Jul 2020 10:26:17 +0000 (13:26 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 14 Jul 2020 10:29:23 +0000 (13:29 +0300)
mpv/.mpv/config
mpv/.mpv/input.conf

index 5c0a642a7e4e9c1c13a95219971eeb09486a7e0e..985bc0b72ffe85152685345bd26d9b460992fcd0 100644 (file)
@@ -11,14 +11,16 @@ display-tags=*
 ytdl=no
 gapless-audio=yes
 autosync=30
+oss-mixer-device=/dev/mixer
+oss-mixer-channel=vol
 
 [AO]
 audio-device=oss//dev/dsp3
-oss-mixer-device=/dev/mixer3
 
 [AM]
 audio-device=oss//dev/dsp2
 oss-mixer-device=/dev/mixer2
+oss-mixer-channel=pcm
 
 [VN]
 af=lavfi=loudnorm
index 5fa349dfae1d28f6cd5bedfbc17f47ad5333d40b..c00863acc6791f3a2c059283b8df18647adc6a11 100644 (file)
@@ -4,3 +4,5 @@ Shift+PGUP add chapter 1
 Shift+PGDWN add chapter -1
 ENTER playlist-next force
 BS set speed 1.0
+VOLUME_UP run "mixer" "-f" "${oss-mixer-device}" "${oss-mixer-channel}" "+2"
+VOLUME_DOWN run "mixer" "-f" "${oss-mixer-device}" "${oss-mixer-channel}" "-2"