Closed rossdargan closed 3 months ago
There were a few issues I had, mainly around network: host. On this network the docker container can't see pulse audio, so I needed to use the ip 127.0.0.1. Also I needed to modify the client.conf - looks the the environmental variable does nothing. But this is working now!
Glad you got it working!
What happened?
I'm running three containers inside docker on a raspberry pi. 1) woahbase/alpine-pulseaudio:aarch64 (called pulseaudio) 2) this container 3) a container with pulseaudio installed on it (a custom one called wyoming-snd-external)
From the custom one I can use pulseaudio in the container by setting this environment setting:
PULSE_SERVER=pulseaudio:4713
. From the host I can also play sounds like this:paplay /usr/share/sounds/alsa/Front_Center.wav --property=media.role=announce -s 127.0.0.1:4713
. The pulseaudio container logs also show connections (And showed authorization issues if I try and connect via the wrong IP ([pulseaudio] protocol-native.c: Denied access to client with invalid authentication data.
)With this configuration
Produces this error: fatal error:
failed to connect to the pulseaudio context -- the error message is "Connection refused".
however, I get no logs in the pulseaudio container.I copied the pulseaudio client.conf out of the shairport container, and modified the default server to be "pulseaudio:4713". I then mounted it as a volume. This gives me the following error instead
fatal error: pa context is not good -- the error message "Connection refused".
Looking at the code this suggest that it maybe ignores the environmental variable
PULSE_SERVER
, however the pulse audio container still doesn't show any connection issues.I then stopped the pulse audio container and still get the error
fatal error: pa context is not good -- the error message "Connection refused".
.Relevant log output
System Information.
Raspberry 5, but it's all running inside docker.
Configuration Information.
-v: