ddf.minim
Class AudioSnippet

java.lang.Object
  extended by ddf.minim.Controller
      extended by ddf.minim.AudioSnippet
All Implemented Interfaces:
Playable

Deprecated.

public class AudioSnippet
extends Controller
implements Playable


Field Summary
 
Fields inherited from class ddf.minim.Controller
BALANCE, GAIN, MUTE, PAN, SAMPLE_RATE, VOLUME
 
Constructor Summary
AudioSnippet(AudioRecording rec)
          Deprecated.  
 
Method Summary
 void close()
          Deprecated. Closes the snippet so that any resources it is using can be released.
 void cue(int millis)
          Deprecated. Sets the position to millis milliseconds from the beginning.
 AudioMetaData getMetaData()
          Deprecated. Returns the meta data for this.
 boolean isLooping()
          Deprecated. Returns true if this is currently playing and has more than one loop left to play.
 boolean isPlaying()
          Deprecated. Returns true if this currently playing.
 int length()
          Deprecated. Returns the length of the sound in milliseconds.
 void loop()
          Deprecated. Sets looping to continuous.
 void loop(int n)
          Deprecated. Sets this to loop num times.
 int loopCount()
          Deprecated. Returns the number of loops left to do.
 void pause()
          Deprecated. Pauses playback.
 void play()
          Deprecated. Starts playback from the current position.
 void play(int millis)
          Deprecated. Starts playback millis from the beginning.
 int position()
          Deprecated. Returns the current position of the "playhead" (ie how much of the sound has already been played)
 void rewind()
          Deprecated. Rewinds to the beginning.
 void setLoopPoints(int start, int stop)
          Deprecated. Sets the loop points used when looping.
 void skip(int millis)
          Deprecated. Skips millis from the current position.
 
Methods inherited from class ddf.minim.Controller
balance, gain, getBalance, getControl, getControls, getGain, getPan, getVolume, hasControl, isMuted, mute, pan, printControls, setBalance, setGain, setPan, setVolume, shiftBalance, shiftGain, shiftPan, shiftVolume, unmute, volume
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AudioSnippet

public AudioSnippet(AudioRecording rec)
Deprecated. 
Method Detail

play

public void play()
Deprecated. 
Description copied from interface: Playable
Starts playback from the current position. If this was previous set to loop, looping will be disabled.

Specified by:
play in interface Playable

play

public void play(int millis)
Deprecated. 
Description copied from interface: Playable
Starts playback millis from the beginning. If this was previous set to loop, looping will be disabled.

Specified by:
play in interface Playable

pause

public void pause()
Deprecated. 
Description copied from interface: Playable
Pauses playback.

Specified by:
pause in interface Playable

rewind

public void rewind()
Deprecated. 
Description copied from interface: Playable
Rewinds to the beginning. This does not stop playback.

Specified by:
rewind in interface Playable

loop

public void loop()
Deprecated. 
Description copied from interface: Playable
Sets looping to continuous. If this is already playing, the position will not be reset to the beginning. If this is not playing, it will start playing.

Specified by:
loop in interface Playable

loop

public void loop(int n)
Deprecated. 
Description copied from interface: Playable
Sets this to loop num times. If this is already playing, the position will not be reset to the beginning. If this is not playing, it will start playing.

Specified by:
loop in interface Playable
Parameters:
n - the number of times to loop

loopCount

public int loopCount()
Deprecated. 
Description copied from interface: Playable
Returns the number of loops left to do.

Specified by:
loopCount in interface Playable
Returns:
the number of loops left

length

public int length()
Deprecated. 
Description copied from interface: Playable
Returns the length of the sound in milliseconds. If for any reason the length could not be determined, this will return -1. However, an unknown length should not impact playback.

Specified by:
length in interface Playable
Returns:
the length of the sound in milliseconds

position

public int position()
Deprecated. 
Description copied from interface: Playable
Returns the current position of the "playhead" (ie how much of the sound has already been played)

Specified by:
position in interface Playable
Returns:
the current position of the "playhead"

cue

public void cue(int millis)
Deprecated. 
Description copied from interface: Playable
Sets the position to millis milliseconds from the beginning. This will not change the playstate. If an error occurs while trying to cue, the position will not change. If you try to cue to a negative position or try to a position that is greater than length(), the amount will be clamped to zero or length().

Specified by:
cue in interface Playable
Parameters:
millis - the position to place the "playhead"

skip

public void skip(int millis)
Deprecated. 
Description copied from interface: Playable
Skips millis from the current position. millis can be negative, which will make this skip backwards. If the skip amount would result in a negative position or a position that is greater than length(), the new position will be clamped to zero or length().

Specified by:
skip in interface Playable
Parameters:
millis - how many milliseconds to skip, sign indicates direction

isLooping

public boolean isLooping()
Deprecated. 
Description copied from interface: Playable
Returns true if this is currently playing and has more than one loop left to play.

Specified by:
isLooping in interface Playable
Returns:
true if this is looping

isPlaying

public boolean isPlaying()
Deprecated. 
Description copied from interface: Playable
Returns true if this currently playing.

Specified by:
isPlaying in interface Playable
Returns:
true if this is currently playing

close

public void close()
Deprecated. 
Closes the snippet so that any resources it is using can be released. This should be called when you are finished using this snippet.


getMetaData

public AudioMetaData getMetaData()
Deprecated. 
Description copied from interface: Playable
Returns the meta data for this.

Specified by:
getMetaData in interface Playable

setLoopPoints

public void setLoopPoints(int start,
                          int stop)
Deprecated. 
Description copied from interface: Playable
Sets the loop points used when looping.

Specified by:
setLoopPoints in interface Playable
Parameters:
start - the start of the loop in milliseconds
stop - the end of the loop in milliseconds