Background music files in bashit are now optional.
This commit is contained in:
parent
12dd76a901
commit
41a151349e
@ -83,8 +83,10 @@ EOF
|
|||||||
play_stop_bgm()
|
play_stop_bgm()
|
||||||
{
|
{
|
||||||
if [ "$1" == "play" ] ; then
|
if [ "$1" == "play" ] ; then
|
||||||
|
if [ -f "$2/bgm.ogg" ] ; then
|
||||||
play -qV0 $2/bgm.ogg repeat 9999&
|
play -qV0 $2/bgm.ogg repeat 9999&
|
||||||
__bgmPID="$(echo "$!")"
|
__bgmPID="$(echo "$!")"
|
||||||
|
fi
|
||||||
elif [ "$1" == "stop" ] ; then
|
elif [ "$1" == "stop" ] ; then
|
||||||
if [[ "$__bgmPID" =~ ^[0-9]+$ ]] ; then
|
if [[ "$__bgmPID" =~ ^[0-9]+$ ]] ; then
|
||||||
kill $__bgmPID
|
kill $__bgmPID
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user