sound.pulse.server

sound.pulse

server(getenv) -> path, err

Find the server's socket

getenv reads a variable, os.getenv by default. $PULSE_SERVER comes first: its first entry that names a Unix socket, as unix:/path or as a bare absolute path. Steam's container sets it to the host's socket, bound inside. A {machine-id} prefix is dropped, since a socket path is local to the machine anyway. With $PULSE_SERVER unset, the socket is $XDG_RUNTIME_DIR/pulse/native.

Returns nil and an error when $PULSE_SERVER names no Unix socket, or when neither variable is set. TCP is not taken.