| java.lang.Object org.apache.tools.ant.taskdefs.optional.sound.AntSoundPlayer
AntSoundPlayer | public class AntSoundPlayer implements LineListener,BuildListener(Code) | | This class is designed to be used by any AntTask that requires audio output.
It implements the BuildListener interface to listen for BuildEvents and could
be easily extended to provide audio output upon any specific build events occuring.
I have only tested this with .WAV and .AIFF sound file formats. Both seem to work fine.
|
Constructor Summary | |
public | AntSoundPlayer() Constructor for AntSoundPlayer. |
AntSoundPlayer | public AntSoundPlayer()(Code) | | Constructor for AntSoundPlayer.
|
addBuildFailedSound | public void addBuildFailedSound(File fileFail, int loopsFail, Long durationFail)(Code) | | Parameters: fileFail - the location of the audio file to be playedwhen the build fails Parameters: loopsFail - the number of times the file should be playedwhen the build is fails Parameters: durationFail - the number of milliseconds the file should beplayed when the build fails |
addBuildSuccessfulSound | public void addBuildSuccessfulSound(File file, int loops, Long duration)(Code) | | Parameters: file - the location of the audio file to be played when thebuild is successful Parameters: loops - the number of times the file should be played whenthe build is successful Parameters: duration - the number of milliseconds the file should beplayed when the build is successful |
buildFinished | public void buildFinished(BuildEvent event)(Code) | | Fired after the last target has finished. This event
will still be thrown if an error occurred during the build.
Parameters: event - the build finished event. See Also: BuildEvent.getException |
buildStarted | public void buildStarted(BuildEvent event)(Code) | | Fired before any targets are started.
Parameters: event - ignored |
targetFinished | public void targetFinished(BuildEvent event)(Code) | | Fired when a target has finished. This event will
still be thrown if an error occurred during the build.
Parameters: event - ignored. See Also: BuildEvent.getException |
taskFinished | public void taskFinished(BuildEvent event)(Code) | | Fired when a task has finished. This event will still
be throw if an error occurred during the build.
Parameters: event - ignored. See Also: BuildEvent.getException |
update | public void update(LineEvent event)(Code) | | This is implemented to listen for any line events and closes the
clip if required.
Parameters: event - the line event to follow |
|
|