sounder.exe - play a wav file from the command line
Sounder.exe plays .wav files from the command line. It was written to provide audible alerts to windows batch files.
Usage: sounder [/stop] [/loop times] [/timer ms] [/help] filename.wav Options: /stop Creates the file "stopfile" in the current directory, which will stop preexisting playback /loop times Plays the wav file "times" times before exiting /timer ms Stops after "ms" milliseconds, even if the sound isn't done /help Shows this help screen. /id Specify a custom stopfile id to stop this sound individually /stopbyid Creates the stopfile specified by /id, which will stop all prexisting matching sounds Options are provided in both the windows and unix styles. The flags "-s", "/s", "/stop", "-l", "/l", "/loop", "-t", "/t", "/timer", "-h", "/?", "/help", "/h", "-v", "/v", "/version" all work but are omitted above for brevity. In order to use the "stopfile" functionality, the working directory must be writable.
Its getting a little complicated, so for instance if you have two alarms, one alerting you to ducks and the other alerting you to bears, but want no more than one copy of each .wav playing simultaneously...
sounder.exe /id bears /stopbyid bears.wav
sounder.exe /id ducks /stopbyid ducks.wav
Those commands can be spammed - at any given time they will stop the playback of the specific wave file and start another, but won't interfere with the other wave file.
To make all the sound stop, regardless of /id, you can issue a "sounder.exe /stop". To make all sound stop and play a new .wav file issue a "sounder.exe /stop newfile.wav". (stops existing playback, then plays newfile.wav)