[UFO Chicago] How Do I Get Pulseuaudio To Work As A Network Sound Server?

Jay F. Shachter jay at m5.chicago.il.us
Thu Jun 22 22:50:51 CDT 2023


Esteemed Colleagues,

At a recent Ufo meeting, someone spoke about setting up pulseaudio as
a network sound server (that was actually you, Matt, if you don't mind
being singled out).

I cannot get it to work.  Here is what I have done so far:

I have added the following lines close to the beginning of
/etc/pulse/default.pa:

  load-module module-esound-protocol-tcp auth-anonymous=1
  load-module module-native-protocol-tcp auth-anonymous=1

That part seems to work, because when I do "netstat -tnap" after doing
"pulseaudio --start", netstat reports that pulseaudio is listening to
ports 16001 and 4713, which it had not formerly reported.

I then typed:

  firewall-cmd --add-port=4713/tcp
  firewall-cmd --add-port=16001/tcp

although that should not even be necessary, because the following
lines appear in the output of "firewall-cmd --list-all-zones":

  trusted (active)
    target: ACCEPT
    sources: 192.168.1.0/24 192.168.2.0/24

In other words, any traffic within my local LANs is accepted by my
firewall, regardless of the settings in the public zone.

Nevertheless, when I type in the following command on another computer
in my LAN:

  export PULSE_SERVER=192.168.2.4

and then I run "mpv --audio-device=pulse" on an audio file, mpv
says (after a while):

  [ao/pulse] Init failed: Connection refused
  [ao] Failed to initialize audio driver 'pulse'
  Could not open/initialize audio device -> no sound.
  Audio: no audio

and the same is true when I set PULSE_SERVER to tcp:192.168.2.4:4713
and to tcp:192.168.2.4:16001.

The server is running Linux.  The client can be running FreeBSD or
Linux -- I tried them both -- and it make no difference, in both cases
mpv fails, and in the same way.  And, in both cases, mpv is perfectly
capable of connecting to the local pulseaudio server when PULSE_SERVER
is unset.

What am I doing wrong?  Probably it is something obvious, but I don't
see it.

As always, thank you in advance for any and all replies.

                        Jay F. Shachter
                        6424 North Whipple Street
                        Chicago IL  60645-4111
                                (1-773)7613784   landline
                                (1-410)9964737   GoogleVoice
                                jay at m5.chicago.il.us
                                http://m5.chicago.il.us

                        "Quidquid latine dictum sit, altum videtur"


More information about the ufo mailing list