You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Diane Holt <ho...@yahoo.com> on 2001/01/10 07:10:05 UTC
[PATCH] task
I've made some modifications to the <sound> task:
- If you specify a directory instead of a file for <success> and/or
<fail>, the task will randomly select a file from the directory
to play.
- I made the default for "loops" 0 instead of 1, since that seemed
like the more reasonable behaviour (ie., play the file once, not
twice, by default).
- I removed the BuildException if the <success> or <fail> element is
missing or if the file/dir specified is bogus, since I don't think
the <sound> task being bungered should be a reason to have your
build actually fail.
- I corrected the spelling of [Ss]ucessful, both in the comments and
in one of the method names. ^
- Assorted other comments clean-up.
As to the first one, I was going to try and use the FilterFilename (or is
it FilenameFilter?) thing, but I couldn't find very good documentation for
it, and it looked like something you needed to understand to really be
able to use, so I bailed on it. Unfortunately, that means the user is
responsible for making sure any specified directory contains only sound
files. If anyone's interested in adding that, though, please feel free --
but I realize the <sound> task isn't a real high priority, just a bit of
fun (and something I could learn some more Java on).
Diane
=====
(holtdl@yahoo.com)
__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/