Package ca.phon.media
Class PlaySegment
java.lang.Object
ca.phon.media.PlaySegment
- Direct Known Subclasses:
SampledPlaySegment
Extension interface for LongSound objects.
E.g.,
float startTime, endTime = ... // setup segment times PlaySegment playSeg = longSound.getExtension(PlaySegment.class); if(playSeg != null) { playSeg.playSegment(startTime, endTime); }
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addPropertyChangeListener
(String propertyName, PropertyChangeListener listener) float
getPropertyChangeListeners
(String propertyName) boolean
isLoop()
boolean
abstract void
playSegment
(float startTime, float endTime, float playbackRate) Play segmentvoid
void
removePropertyChangeListener
(String propertyName, PropertyChangeListener listener) void
setLoop
(boolean loop) void
setPlaying
(boolean playing) void
setPosition
(float position) abstract void
stop()
Stop playing segment.
-
Constructor Details
-
PlaySegment
public PlaySegment() -
PlaySegment
-
-
Method Details
-
playSegment
public abstract void playSegment(float startTime, float endTime, float playbackRate) throws IOException Play segment- Parameters:
startTime
-endTime
-- Throws:
IOException
- on error
-
stop
public abstract void stop()Stop playing segment. -
isLoop
public boolean isLoop() -
setLoop
public void setLoop(boolean loop) -
isPlaying
public boolean isPlaying() -
setPlaying
public void setPlaying(boolean playing) -
getPosition
public float getPosition() -
setPosition
public void setPosition(float position) -
addPropertyChangeListener
-
removePropertyChangeListener
-
getPropertyChangeListeners
-
addPropertyChangeListener
-
removePropertyChangeListener
-
getPropertyChangeListeners
-