Advertisement
metalx1000

PulseAudio Shell Control Notes

Oct 11th, 2015
678
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.37 KB | None | 0 0
  1. #pulseaudio Shell control Notes
  2. #list all sinks and what they are
  3. pactl list|grep -e "^Sink" -e "Name" -e "application"|grep "^Sink" -A1
  4.  
  5. #Example Output:
  6. -----------------------
  7. Sink #0
  8.     Name: jack_out
  9. Sink #1
  10.     Name: alsa_output.pci-0000_01_00.1.hdmi-stereo
  11. Sink #2
  12.     Name: alsa_output.usb-0d8c_C-Media_USB_Audio_Device-00.analog-stereo
  13. --
  14. Sink Input #1204
  15.         application.name = "blender"
  16. --
  17. Sink Input #1320
  18.         application.name = "MPlayer"
  19. -----------------------
  20. #Change Volume of the Current Master output
  21. pactl set-sink-volume @DEFAULT_SINK@ +10%
  22. pactl set-sink-volume @DEFAULT_SINK@ -10%
  23.  
  24. #Control Mplayer ("Sink Input")
  25. pactl set-sink-input-volume 1320 +10% #Volume Down
  26. pactl set-sink-input-volume 1320 -10% #Volume up
  27. pactl set-sink-input-volume 1320 50% #Set Volume to 50%
  28.  
  29.  
  30. #First Sink ("Master Volume"?) controls
  31. pactl set-sink-volume 0 -10% #Down 10%
  32. pactl set-sink-volume 0 +10% #Up 10%
  33. pactl set-sink-volume 0 100% #set to 100%
  34.  
  35. #list all programs using pulseaudio
  36. pactl list short sink-inputs
  37.  
  38. #example output
  39. 15  0   34  protocol-native.c   s16le 2ch 44100Hz
  40. 16  0   47  protocol-native.c   s16le 2ch 44100Hz
  41.  
  42. #change output for program to sink 1
  43. pacmd move-sink-input 16 1
  44.  
  45. #change output for program to sink by name
  46. pacmd move-sink-input 16 <device name>
  47.  
  48. #example:
  49. pacmd move-sink-input 16 alsa_output.usb-0d8c_C-Media_USB_Audio_Device-00.analog-stereo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement