Code Sample |
xmms "$i" & xmmspid=$! wait for xmms to finish writing (how to tell?) kill $xmmspid |
Quote (mikshaw @ May 22 2006,00:46) | ||
|
Code Sample |
#!/bin/sh # check if xmms if running and quit if it is running xmmsctrl running && xmmsctrl quit <change output plugin command goes here> if [ "$1" = "" ]; then FILEDIR="path/to/wma/dir/or/single/wma" else FILEDIR="$@" # launch xmms xmmsctrl launch # this command will load single file or files from a directory to xmms xmmsctrl dir "$FILEDIR" # multiple dirs : xmmsctrl dir BEGIN dir1 dir2 END # maybe without BEGIN and END it'll also work # now you have to tell xmms to start playing/converting xmmsctrl play # this loop checks if xmms is playing/converting # and if yes it checks the playlist length in seconds # and sleeps for that amount of seconds while `xmmsctrl playing` do P=0 for i in `xmmsctrl print "%*S%n"` # checks the length of playlist in seconds do P=$(( P + $i )) done sleep $P done # when the loop ends it means that xmms stopped playing/converting and now you can kill xmms with this command: xmmsctrl quit <restore config file command goes here> # if you have xmmsctrl in your PATH environemental (?) variable # you can add some lines to this script to change the xmms config file and it should convert your wma's # You can also consider putting this somewhere in the beginning : sed -i 's/shuffle=TRUE/shuffle=FALSE/;s/repeat=TRUE/repeat=FALSE/' ~/.xmms/config |
Quote (lesliek @ May 22 2006,01:28) |
Does "pidof xmms" get xmms's pid(s) without backgrounding xmms? I opened xmms by clicking on its icon on the desktop. I then opened a terminal, typed pidof xmms and pressed Enter and got as output: 1189 1190 1191 1192. Of course, I may not be understanding what backgrounding is. |