You are not logged in.
So let's suppose Skype forces me to move to Pulse. I know how to force mplayer to use the hdmi output instead of hw0:0 but how do I do the same once I have moved to Pulse?
Offline
Install "pavucontrol" and that has a tab that lets you choose your default input and output devices, including HDMI.
Once you do that you tell mplayer to use Pulse. If mplayer doesn't do Pulse, but does do ALSA then install Pulse Audio ALSA to create a fake ALSA sink which goes into and is managed by Pulse.
Offline
mplayer might work with something like
mplayer -ao pulse::SINKNAME URI
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
The Pulse Audio ALSA sink I use because Adobe Flash uses ALSA, it works perfect with my Pulse system configuration. I didn't mention, but if you have a custom asound.conf in your home folder then rename that to something else so it isn't used, Pulse Audio ALSA installs one that makes ALSA programs feed into it instead.
Offline
I do not want to change the default, that's why I use a command line argument. Occasionally I plug in the laptop into the HDTV on the wall and want to run the audio over HDMI to there. Most of the time the 3.5" output (hw0:0) is fine.
Last edited by chx (2014-06-22 07:55:25)
Offline
here a little dmenu script to change output/change volume
run with scriptname -sink
if you use this with slmenu instead of dmenu its a purely console based menu
#!/bin/bash
client=$(pacmd list-sink-inputs | grep -E 'client:|index:' | awk 'NR % 2 == 1 { o=$0 ; next } { print o " " $0 }'| awk '{print $2" "substr($0, index($0,$5))}' | dmenu -p "Clients: " $@)
case $1 in
-vol)
shift
levels="0
10
20
30
40
50
60
70
80
90
100"
volume=$(echo "$levels" | dmenu -p "Volume: " $@)
set_vol=$(echo "scale=1; $volume / 100 * 65536" | bc)
pacmd set-sink-input-volume "$( echo "$client" | awk '{print $1}' 2>/dev/null )" "${set_vol%.*}"
;;
-sink)
shift
sink=$(pacmd list-sinks | grep name: | awk 'gsub(">$","")' | cut -c 9- | dmenu -p "Sink: " $@)
pacmd move-sink-input $(echo "$client" | awk '{print $1}') $(echo $sink)
;;
*)
esac
Last edited by Rasi (2014-06-22 08:35:03)
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline