Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.ant.taskdefs.optional.sound
Class SoundTask

    java.lang.Object
      |
      +--org.apache.tools.ant.Task
            |
            +--org.apache.tools.ant.taskdefs.optional.sound.SoundTask

public class SoundTask
extends Task

This is an example of an AntTask that makes of use of the AntSoundPlayer. There are three attributes to be set: `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

Version:
  $Revision: 1.3 $, $Date: 2001/02/04 10:51:01 $
Author:
  Nick Pellow

Inner Class Summary
`class` | `SoundTask.BuildAlert` A class to be extended by any BuildAlert's that require the output of sound.

Fields inherited from class org.apache.tools.ant.Task
`description, location, project, target, taskName, taskType, wrapper`

Constructor Summary
`SoundTask()`

Method Summary
`SoundTask.BuildAlert` | `createFail()`
`SoundTask.BuildAlert` | `createSuccess()`
`void` | `execute()` Called by the project to let the task do it's work.
`void` | `init()` Called by the project to let the task initialize properly.

Methods inherited from class org.apache.tools.ant.Task
`getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, log, log, maybeConfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SoundTask

    public SoundTask()

Method Detail

### createSuccess

    public SoundTask.BuildAlert createSuccess()

### createFail

    public SoundTask.BuildAlert createFail()

### init

    public void init()

  Description copied from class: `Task`
  Called by the project to let the task initialize properly.
  Overrides:
    `init` in class `Task`
  Following copied from class: `org.apache.tools.ant.Task`
  Throws:
    `BuildException` - if someting goes wrong with the build

### execute

    public void execute()

  Description copied from class: `Task`
  Called by the project to let the task do it's work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running "ant target1 target2" will run all tasks in target3 twice.
  Overrides:
    `execute` in class `Task`
  Following copied from class: `org.apache.tools.ant.Task`
  Throws:
    `BuildException` - if someting goes wrong with the build

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 Apache Software Foundation. All Rights Reserved.