On Sat, 16 Jul 2022, Lee wrote:
I don't have play, so I tried aplay .. and it works, even if I'm
logged out, even if someone else is logged in.
## run the script every minute
$ crontab -l | tail -3
# m h dom mon dow command
* * * * * /home/lee/bin/neener.sh
## which plays a .wav and an .au file
$ cat ~/bin/neener.sh
#!/bin/sh
/usr/bin/aplay -q $HOME/Sounds/Old/NEENER.WAV
sleep 0.25
/usr/bin/aplay -q $HOME/Sounds/SunOS/busy.au
I get the following error message from aplay:
ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
aplay: main:830: audio open error: Device or resource busy
and a different message from play:
ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
/usr/bin/play FAIL sox: Sorry, there is no default audio device configured
I'm wondering what causes this. Do you have any specific environment variable
set which defines a default audio device?
Roger