I have script which execute mplayer command to play audio in crontab. It will be executed in a special time. But this script can not play audio when ncmpcpp ( a front-end for mpd - music player daemon) is playing music. But this script can play audio when I execute it from terminal like this: $ sh bin/alarm.sh I try to get output from crontab or script, but get nothing. I guess some setting in ncmpcpp or mplayer is wrong. Or mpd is using same daemon with crontab's daemon. Anyway, I can not find out the solution. If you know, please help me.
|
feedback
|
|
The problem seems to be that mpd runs under user mpd per default (as a system daemon) and is thus unable to join your sessions' pulseaudio mixer, therefore it hogs the sound card output via alsa or even oss. In my answer, I assume that you are logged in and that the crontab is yours and not the system crontab. MPDDepending on your priorities, you have a lot of options that mostly circle around the idea teaching mpd to not hog the sound and use pulseaudio instead. See the mpd wiki. mplayerYou can configure mplayer to default to pulseaudio by placing a line | |||
feedback
|
|
In your crontab, please add this to the command section
The | |||
feedback
|
|
When using e.g.
| |||
|
feedback
|