-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday, 2011-03-12 at 13:38 -0300, Cristian Rodríguez wrote:
El 12/03/11 01:29, Carlos E. R. escribió:
I have this test line in my user crontab:
* * * * * /usr/bin/play /tmp/time.wav
a) Do you want to get owned ? :-D
Huh? What does that mean? A security risk, perhaps? :-? Not a problem here, it's a home network, only one user presently. But what could happen?
b) did you mean "aplay" ?
No, play, part of sox. I'll try the full path to the bin, just in case. Mmm, no, aplay produces the same error (it works in the CLI): ALSA lib pcm_dmix.c:1010:(snd_pcm_dmix_open) unable to open slave aplay: main:608: audio open error: Device or resource busy with play the error was: ALSA lib pcm_dmix.c:1010:(snd_pcm_dmix_open) unable to open slave play FAIL formats: can't open output file `default': snd_pcm_open error: Device or resource busy For clarification, there is a busy resource because I have a page opened in firefox with flash playback paused (SG·U Kino webisodes), which interferes with festival producing sound. I'm testing alternatives, like play, which works in the CLI, because Pulse can simultaneate sound from different applications. But the same app called from cron fails. It maybe that from inside cron it is not accessing pulse daemon.
Needless to say, that same command line on the CLI works just fine.
strace the process if possible, to see wth goes wrong, most likely the lack of some enviroment variable.
I'll try that later, I have to leave. ... I just tried in cron: SDL_AUDIODRIVER=pulse /usr/bin/aplay /tmp/time.wav also fails, same error. Ah! Found it: ALSA_CONFIG_PATH=/etc/alsa-pulse.conf SDL_AUDIODRIVER=pulse /usr/bin/aplay /tmp/time.wav This one works! You gave me the clue, I did: cer@Telcontar:~> set | grep -i pulse ALSA_CONFIG_PATH=/etc/alsa-pulse.conf SDL_AUDIODRIVER=pulse Thanks! - -- Cheers, Carlos E. R. (from 11.2 x86_64 "Emerald" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (GNU/Linux) iEYEARECAAYFAk17qBMACgkQtTMYHG2NR9V61QCghHC2BBjVC59ZxLZqEcF8FRMH aVsAnjeDAIHjepViHWIUCayAjQROvrY4 =vps+ -----END PGP SIGNATURE-----