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

## ddf.minim.spi
Interface AudioRecording

All Superinterfaces:
  AudioResource

All Known Subinterfaces:
  AudioRecordingStream

    public interface AudioRecording

extends AudioResource

An `AudioRecording` is an `AudioResource` that has methods that allow the audio to played, similar to the `Playable` interface.

Author:
  Damien Di Fede

Method Summary
`int` | `getLoopCount()` How many loops are left to go.
`AudioMetaData` | `getMetaData()` Returns meta data about the recording, such as duration, name, ID3 tags perhaps.
`int` | `getMillisecondLength()` Returns the length of the source in milliseconds.
`int` | `getMillisecondPosition()` Gets the current millisecond position of the source.
`boolean` | `isPlaying()`
`void` | `loop(int count)` Starts looping playback from the current position.
`void` | `pause()` Stops playback of the source.
`void` | `play()` Starts playback of the source.
`void` | `setLoopPoints(int start, int stop)` Sets the loops points in the source, in milliseconds
`void` | `setMillisecondPosition(int pos)` Sets the current millisecond position of the source.

Methods inherited from interface ddf.minim.spi.AudioResource
`close, getControls, getFormat, open`

Method Detail

### play

    void play()

  Starts playback of the source.

### pause

    void pause()

  Stops playback of the source.

### isPlaying

    boolean isPlaying()

### loop

    void loop(int count)

  Starts looping playback from the current position. Playback will continue to the loop's end point, then loop back to the loop start point count times, and finally continue playback to the end of the clip. If the current position when this method is invoked is greater than the loop end point, playback simply continues to the end of the source without looping. A count value of 0 indicates that any current looping should cease and playback should continue to the end of the clip. The behavior is undefined when this method is invoked with any other value during a loop operation. If playback is stopped during looping, the current loop status is cleared; the behavior of subsequent loop and start requests is not affected by an interrupted loop operation.

  Parameters:
    `count` - the number of times playback should loop back from the loop's end position to the loop's start position, or Minim.LOOP_CONTINUOUSLY to indicate that looping should continue until interrupted

### setLoopPoints

    void setLoopPoints(int start,
                       int stop)

  Sets the loops points in the source, in milliseconds

  Parameters:
    `start` - the position of the beginning of the loop
    `stop` - the position of the end of the loop

### getLoopCount

    int getLoopCount()

  How many loops are left to go. 0 means this isn't looping and -1 means that it is looping continuously.

  Returns:
    how many loops left

### getMillisecondPosition

    int getMillisecondPosition()

  Gets the current millisecond position of the source.

  Returns:
    the current possition, in milliseconds in the source

### setMillisecondPosition

    void setMillisecondPosition(int pos)

  Sets the current millisecond position of the source.

  Parameters:
    `pos` - the posititon to cue the playback head to

### getMillisecondLength

    int getMillisecondLength()

  Returns the length of the source in milliseconds. Infinite sources, such as internet radio streams, should return -1.

  Returns:
    the length of the source, in milliseconds

### getMetaData

    AudioMetaData getMetaData()

  Returns meta data about the recording, such as duration, name, ID3 tags perhaps.

  Returns:
    the MetaData of the recording

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