Pulse Audio

    Ton control pulse audio during runtime : pacmd

    Change default sink (equivalent to "output" from application to device audio)

    - First retrieve sinks `pacmd list-sinks`
    - And set default sink : `pacmd set-default-sink index|name`
    

    Note: You could need to restart current application

    Redirect sound on server

    Advice: This is really bullshit, try another technology.

    /etc/pulse/default.pa

    load-module module-native-protocol-tcp
    load-module module-zeroconf-discover
    
    load-module module-tunnel-sink-new server=192.168.0.1 sink_name=Remote channels=2 rate=44100
    

    Notice:

    - Change the ip of server
    - I don't know if channels and rate is required (need to be verify)
    - The file default.pa is when you start without --system mode, and system.pa is when you start as system mode((http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/)).
    - Also possible to load just one time during session with command ''pacmd load-module module-tunnel-sink server=192.168.2.30''
    - ''padevchooser'' or ''pasystray'' command could be useful for debug((choose default sink, see what sink and other source are available, choose volume))
    - Check the version of pulseaudio client/server. If there are not equivalent, you could have problem about socket exchanges.
    

    /etc/pulse/client.conf

    default-server = 192.168.0.1
    

    Note: Seems to be really not omptimize ((see /var/log/syslog when server is not available))

    Server configuration

    Set Volume

    Set volume through alsa on pulse: amixer -D pulse sset Master 50%

    Note: "Master" is the name of sink

    Set volume through pulse: pacmd set-sink-volume <index> <volume>

    Source

    Server

    Allow client on network playing sound

    Advice: This is really bullshit, try another technology.

    apt-get install pulseaudio pulseaudio-module-zeroconf avahi-daemon dbus-x11
    

    /etc/default/pulseaudio

    PULSEAUDIO_SYSTEM_START=1
    

    Note: This was before jessie, so on jessie i don't know how to start automatically, i use pulseaudio -vvv --system --disallow-module-loading=0 from shell.

    /etc/pulse/system.pa

    load-module module-zeroconf-publish
    load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/24
    

    Note: If you don't run pulseaudio as system mode, add theses lines in /etc/pulse/default.pa

    Source 1 Source 2 Source 3

    /etc/pulse/daemon.conf

    allow-module-loading = yes