Package ca.phon.media

Class PlaySegment

java.lang.Object
ca.phon.media.PlaySegment
Direct Known Subclasses:
SampledPlaySegment

@Extension(LongSound.class) public abstract class PlaySegment extends Object
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 Details

    • PlaySegment

      public PlaySegment()
    • PlaySegment

      public PlaySegment(VolumeModel volumeModel)
  • 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

      public void addPropertyChangeListener(PropertyChangeListener listener)
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener listener)
    • getPropertyChangeListeners

      public PropertyChangeListener[] getPropertyChangeListeners()
    • addPropertyChangeListener

      public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
    • removePropertyChangeListener

      public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
    • getPropertyChangeListeners

      public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)