@echo off
set i=%2
if not "%i%"=="a" color 1F
if "%i%"=="a" color 07
echo Do not close this window manually
::for custom sound effects, please use WAV (Microsoft) with IMA ADPCM
::in 8 kHz
set file=%1
title Playing %file%.wav
setlocal EnableDelayedExpansion EnableExtensions
path=%path%;%cd%\dll
cd snd
:loop
if "%file%"=="" goto aproblem
if "%file%"=="weed" goto arealproblem
if not exist "%file%.wav" goto aproblem
..\dll\bg.dll play %file%.wav 1
..\dll\bg.dll stop %file%.wav
exit

:arealproblem
echo.
echo Audio playback failure
echo.
echo Reason: Too much weed m9
echo.
goto :eof

:aproblem
echo.
echo Audio playback failure
echo.
echo Make sure that the file in the argument exists.
echo Check for any typos. Do not launch this file
echo as of itself: it won't get you far.
echo.
Pause

::menu sounds by Lokif, licenced under Public Domain