exec mplayer -ao oss:/dev/dsp -cache 128 "$stream" "$@"
exit 1
else
- streamlist="`lynx -source http://${pathslashed}|sed -n \
- -e 's/^File[0-9]*=//p' \
- -e 's#^.*"\(mms://[^"]*\)".*$#\1#p' \
- |tr -d '\r'`"
- for stream in $streamlist;do
- # Using "set -e" here:
- # mplayer rc 0 on failure to read the stream
- # mplayer rc 0 on 'q'
- # mplayer rc 1 on ctrl-c
- ip="` echo "$stream"|sed -n 's#^http://\([^:/]*\).*$#\1#p'`"
- if [ -n "$ip" ];then
- port="`echo "$stream"|sed -n 's#^http://[^:/]*:\([0-9][0-9]*\).*$#\1#p'`"
- port="${port:-80}"
- echo >&2 "Checking $stream -> {$ip}:{$port} ..."
- if ! nc -w 2 "$ip" "$port";then
- echo >&2 "TIMEOUT: $stream"
- continue
+ while :;do
+ streamlist="`lynx -source http://${pathslashed}|sed -n \
+ -e 's/^File[0-9]*=//p' \
+ -e 's#^.*"\(mms://[^"]*\)".*$#\1#p' \
+ |tr -d '\r'`"
+ for stream in $streamlist;do
+ # Using "set -e" here:
+ # mplayer rc 0 on failure to read the stream
+ # mplayer rc 0 on 'q'
+ # mplayer rc 1 on ctrl-c
+ ip="` echo "$stream"|sed -n 's#^http://\([^:/]*\).*$#\1#p'`"
+ if [ -n "$ip" ];then
+ port="`echo "$stream"|sed -n 's#^http://[^:/]*:\([0-9][0-9]*\).*$#\1#p'`"
+ port="${port:-80}"
+ echo >&2 "Checking $stream -> {$ip}:{$port} ..."
+ if ! nc -w 2 "$ip" "$port";then
+ echo >&2 "TIMEOUT: $stream"
+ continue
+ fi
fi
- fi
- mplayer -ao oss:/dev/dsp -cache 128 "$stream" "$@"
+ mplayer -ao alsa:device=hw=0 -cache 128 "$stream" "$@"
+ done
done
fi