ddf.minim.spi
Interface AudioRecordingStream

All Superinterfaces:
AudioResource, AudioStream

public interface AudioRecordingStream
extends AudioStream


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()
          Disallows playback/reads of the source.
 void play()
          Allows playback/reads 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.AudioStream
read, read
 
Methods inherited from interface ddf.minim.spi.AudioResource
close, getControls, getFormat, open
 

Method Detail

play

void play()
Allows playback/reads of the source.


pause

void pause()
Disallows playback/reads of the source. If this is pause, all calls to read will generate arrays full of zeros (silence).


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