pulse: allow sending sound to phone
This commit is contained in:
parent
fcc16b734c
commit
4314b39af6
|
@ -40,7 +40,7 @@ depends=(
|
|||
vdirsyncer khal khard
|
||||
|
||||
# Audio
|
||||
pulseaudio pulseaudio-alsa pulseaudio-bluetooth
|
||||
pulseaudio pulseaudio-rtp pulseaudio-alsa pulseaudio-bluetooth
|
||||
pamixer pulsemixer pavucontrol
|
||||
|
||||
# Fonts
|
||||
|
|
|
@ -1,20 +1,32 @@
|
|||
#!/bin/sh
|
||||
|
||||
opts="Fone\nSpeaker\nHDMI"
|
||||
opts="Fone\nSpeaker\nHDMI\nPhone"
|
||||
out=$(printf $opts | wdmenu -p "Output: ")
|
||||
vol=$(pamixer --get-volume)
|
||||
|
||||
case "$out" in
|
||||
Fone)
|
||||
pactl set-card-profile 0 output:analog-stereo+input:analog-stereo
|
||||
pactl set-default-sink $(pactl list sinks short | grep alsa | head -n1 | cut -f2)
|
||||
pactl set-sink-port @DEFAULT_SINK@ analog-output-headphones
|
||||
;;
|
||||
Speaker)
|
||||
pactl set-card-profile 0 output:analog-stereo+input:analog-stereo
|
||||
pactl set-default-sink $(pactl list sinks short | grep alsa | head -n1 | cut -f2)
|
||||
pactl set-sink-port @DEFAULT_SINK@ analog-output-speaker
|
||||
;;
|
||||
HDMI)
|
||||
pactl set-card-profile 0 output:hdmi-stereo+input:analog-stereo
|
||||
pactl set-default-sink $(pactl list sinks short | grep hdmi | head -n1 | cut -f2)
|
||||
;;
|
||||
Phone)
|
||||
pactl unload-module module-null-sink
|
||||
pactl unload-module module-rtp-send
|
||||
|
||||
pactl load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=48000
|
||||
pactl load-module module-rtp-send source=rtp.monitor destination=192.168.0.169 port=4010 mtu=320
|
||||
|
||||
pactl set-default-sink rtp
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Reference in New Issue