On Sun, 07 Dec 2008 11:29:41 -0800 Pete Nesbitt <pete@linux1.ca> wrote:
<snip> I have it functioning at the cli but when I start the player (with the same cmd) from within the script, a write to the fifo file just hangs and does not return. This happens writting to it via script or at cli. Strange.
I'm using this in both cli and script, with $TRACK being the path to the flac audio file.
mplayer -slave -input file=/data/cm_temp/mplayer_cmds_fifo -quiet ${TRACK} &> /dev/null
echo pause > /data/cm_temp/mplayer_cmds_fifo
Anyway, I really like the FIFO idea, and will work on finding why the script-started mplayer is not letting anything write to the fifo.
I fixed the hanging/non-return issue, I can tail the fifo file and it is being written but not being picked up by mplayer. It does not seem to matter what I send mplayers stdout/err to (null or the pipe). So a little progress anyway. Could the backgrounded while-loop that mplayer runs in be involved? It does not seem likely, player should still see the pipe/file. This is the guts of the loop, I need to send output somewhere to get control back when I bg it, so I think the 'done' line need to stay as is. while .... do ... ${MPLAYER} -slave -input file=/data/cm_temp/mplayer_cmds_fifo \ -quiet ${TRACK} &> /dev/null ... done < ${PLAY_LIST} &> /dev/null & -Pete