updated on Wed Jan 11 08:01:35 UTC 2012
[aur-mirror.git] / milena-mplayer / milena_mplayer.sh
blob4c67fae42f09e064f44df38b5971366d70b03192
1 #!/bin/bash
2 # 0.2:
3 # dracorp: parametry -noass i -noquiet
5 msg() {
6 printf "\e[0;32;1m==> \e[0;1m%s..\e[0m" "$1"
8 msg_end() {
9 if [ "$1" = "0" ]; then
10 printf " \e[0;32;1mdobrze\e[0m\n"
11 else
12 printf " \e[0;33;1mblad\e[0m\n"
13 exit $1
17 if [ -z "$@" ]; then
18 echo "milena_mplayer [opcje mplayera]"
19 exit
22 msg "Przygotowywanie syntezy mowy"
23 mplayer -dumpjacosub -noass -ao null -vo null -frames 0 "$@" &> /dev/null
24 msg_end $?
26 msg "Odtwarzanie"
27 if [ -f "dumpsub.jss" ]; then
28 (mplayer "$@" -softvol -noquiet | milena_subplayer dumpsub.jss) &> /dev/null
29 msg_end $?
30 rm dumpsub.jss
31 else
32 mplayer "$@" &> /dev/null
33 msg_end $?