two sound files at the same time - problem with crontab (pulseaudio involved)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi altogether,

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 /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/Pausenzeichen/Big_Ben_chimes/Big_Ben_quarter_hour  >/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:

mpv --loop=inf /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Musik/sounds_von_anoise/sounds/coffee_shop.ogg

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

mplayer /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/Pausenzeichen/Big_Ben_chimes/Big_Ben_quarter_hour

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 control.
Terminal type `unknown' is not defined.

Playing /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/Pausenzeichen/Big_Ben_chimes/Big_Ben_three_quarters_of_the_hour.
libavformat version 58.29.100 (external)
Audio only file format detected.
Load subtitles in /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/Pausenzeichen/Big_Ben_chimes/
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, II, III)
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

pulseaudio-discuss mailing list

[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux