public class AudioSnippet extends Controller implements Playable
BALANCE, GAIN, MUTE, PAN, SAMPLE_RATE, VOLUME
Constructor and Description |
---|
AudioSnippet(ddf.minim.spi.AudioRecording rec)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
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 and
AudioMetaData object that describes this audio. |
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. |
balance, gain, getBalance, getControl, getControls, getGain, getPan, getVolume, hasControl, isMuted, mute, pan, printControls, setBalance, setGain, setPan, setVolume, shiftBalance, shiftGain, shiftPan, shiftVolume, unmute, volume
public void play()
Playable
public void play(int millis)
Playable
millis
from the beginning.
If this was previously set to loop, looping will be disabled.public void pause()
Playable
public void rewind()
Playable
public void loop()
Playable
public void loop(int n)
Playable
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.public int loopCount()
Playable
public int length()
Playable
public int position()
Playable
public void cue(int millis)
Playable
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()
.public void skip(int millis)
Playable
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()
.public boolean isLooping()
Playable
public boolean isPlaying()
Playable
public void close()
public AudioMetaData getMetaData()
Playable
AudioMetaData
object that describes this audio.getMetaData
in interface Playable
AudioMetaData
for thisAudioMetaData
public void setLoopPoints(int start, int stop)
Playable
setLoopPoints
in interface Playable
start
- the start of the loop in millisecondsstop
- the end of the loop in milliseconds