[pulseaudio-discuss] two sound files at the same time - problem with crontab (pulseaudio involved)
abelschreck3 at freenet.de
Sat May 15 14:34:36 UTC 2021
I am curious as how to solve a peculiar "problem".
I have Big-Ben chimes played out with *mplayer* every quarter of an hour
and put the respective entries in my /crontab/.
15 * * * * if [ ! -f /tmp/Ruhe ]; then mplayer
>/tmp/chimes.log 2>&1; fi
That works very well. But I run into problems *if* I have some other
noise (sound-file) played out *at the same time*.
As a rule I run this command:
from within a terminal.
which plays some coffee-shop background noise in a permanent loop.
This command in itself works well too.
However: when running the mpv-command for background noise (which runs
continually) I don´t get the chimes with mplayer any more...
... which is weird as they are played back when issuing the respective
command*from within a terminal*.
So, the command
works even if "coffee-shop" is running at the same time.
But it *doesn´t* work whenever it´s started by crontab!
I took a look at /tmp/chimes.log with "tail -f /tmp/chimes.log"
and came up with this info:
tail: /tmp/chimes.log: Datei abgeschnitten
MPlayer 1.3.0 (Debian), built with gcc-9 (C) 2000-2016 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote
Terminal type `unknown' is not defined.
libavformat version 58.29.100 (external)
Audio only file format detected.
Load subtitles in
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I,
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
[AO_ALSA] alsa-lib: pcm_hw.c:1715:(snd_pcm_hw_open) open
'/dev/snd/pcmC0D0p' failed (-16): Device or resource busy
[AO_ALSA] alsa-lib: pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
[AO_ALSA] Playback open error: Device or resource busy
Failed to initialize audio driver 'alsa'
[AO SDL] Samplerate: 44100Hz Channels: Stereo Format s16le
[AO SDL] using aalib audio driver.
[AO SDL] Unable to open audio: No available audio device
Failed to initialize audio driver 'sdl:aalib'
Could not open/initialize audio device -> no sound.
Audio: no sound
Video: no video
Exiting... (End of file)
Does anybody have a clue why that "problem" exists?
Many thanks in advance.
Greetings from Rosika
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pulseaudio-discuss