rm new_audio_script.audio

for FILE in `ls *.wav`; do
    let FILENAMELEN=${#FILE}
	let FILENAMELEN-=4
	SOUNDNAME=${FILE:0:FILENAMELEN}

	SOUNDNAME=`echo $SOUNDNAME | tr A-Z a-z`

	echo "$SOUNDNAME"								>> new_audio_script.audio
	echo "{"									>> new_audio_script.audio
	echo "    spatial 2d"							>> new_audio_script.audio
	echo "    {"								>> new_audio_script.audio
	echo "        sample #soundsdir/announcer/$FILE"		>> new_audio_script.audio
	echo "        priority 8"						>> new_audio_script.audio
	echo "        volume const 1"						>> new_audio_script.audio
	echo "        mixgroup announcer"					>> new_audio_script.audio
	echo "    }"								>> new_audio_script.audio
	echo "}"									>> new_audio_script.audio
done