This Docker image just plays the ALSA's test sound in the container from the macOS host's speaker.
curl -L https://git.io/Jvihu -o run-test-local.sh && chmod +x "$_"
./run-test-local.sh
docker pull keinos/speaker-test
-
pulseaudio
must be installed on your macOS host. Using Homebrew is the easiest way.$ # Install pulseaudio $ brew install pulseaudio ...
Download the shell script from https://git.io/Jvihu and run.
$ # Download the script
$ cd ~/
$ curl -L https://git.io/Jvihu -o run-test-local.sh && chmod +x "$_"
$ # Run the script
$ ./run-test-local.sh
- NOTE:
- It might be asked for a permission to let PalseAudio access your host.
- https://git.io/Jvihu is an alias of https://KEINOS.github.io/Dockerfile_of_Speaker-Test-for-MacHost/run-test-local.sh
-
Be sure that
pulseaudio
is running on host's (macOS') backgroud as a daemon.$ # Run pulseaudio daemon $ pulseaudio --load=module-native-protocol-tcp --exit-idle-time=-1 --daemon ...
-
pull
orbuild
the image.$ docker pull keinos/speaker-test
Or clone the repo and build it locally. Try if your architecture is not x86_64 and get errors.
$ cd ~/ $ git clone /~https://github.com/KEINOS/Dockerfile_of_Speaker-Test-for-MacHost.git speaker-test $ cd "$_" $ docker build --no-cache -t keinos/speaker-test .
-
Run the container.
docker run --rm -it -v ~/.config/pulse:/home/pulseaudio/.config/pulse keinos/speaker-test
Be sure that
~/.config/pulse
directory exists in your host and contains files such like below:$ ls ~/.config/pulse YourMachineName.local-card-database.x86_64-apple-darwin18.0.0.simple YourMachineName.local-default-sink YourMachineName.local-default-source YourMachineName.local-device-volumes.x86_64-apple-darwin18.0.0.simple YourMachineName.local-runtime YourMachineName.local-stream-volumes.x86_64-apple-darwin18.0.0.simple
-
If you hear "Front, left. Front, right" then it works.
-
How to check if the
pulseaudio
daemon is running.$ # Results if the daemon is running $ pulseaudio --check -v W: [] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support. I: [] main.c: Daemon running as PID 18848 $ # Results if the daemon is NOT running $ pulseaudio --check -v W: [] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support. I: [] main.c: Daemon not running