org.apache.tools.ant.taskdefs.optional.sound
public class SoundTask extends Task
source: the location of the audio file to be played
duration: play the sound file continuously until "duration" milliseconds has expired
loops: the number of times the sound file should be played until stopped
I have only tested this with .WAV and .AIFF sound file formats. Both seem
to work fine.
plans for the future:
- use the midi api to define sounds (or drum beat etc) in xml and have
Ant play them back
| Nested Class Summary | |
|---|---|
| class | SoundTask.BuildAlert
A class to be extended by any BuildAlert's that require the output
of sound. |
| Constructor Summary | |
|---|---|
| SoundTask() Constructor for SoundTask. | |
| Method Summary | |
|---|---|
| SoundTask.BuildAlert | createFail()
add a sound when the build fails |
| SoundTask.BuildAlert | createSuccess()
add a sound when the build succeeds |
| void | execute()
Execute the task. |
| void | init()
Initialize the task. |
Returns: a BuildAlert to be configured
Returns: a BuildAlert to be configured