com.meapsoft
Class Chunk

java.lang.Object
  extended bycom.meapsoft.Chunk
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
FeatChunk

public abstract class Chunk
extends java.lang.Object
implements java.lang.Comparable

Representation of a single audio chunk (i.e. a single line of an EDL or feature file).


Field Summary
 java.lang.String comment
           
 double length
           
 java.lang.String srcFile
           
 double startTime
           
 
Constructor Summary
Chunk(java.lang.String sf, double st, double l)
          Chunk constructor
 
Method Summary
 int compareTo(java.lang.Object o)
          Compare one Chunk to another - comparisons are performed based on srcFile and then startTime fields.
 double[] getSamples(javax.sound.sampled.AudioFormat format)
          Load samples corresponding to this Chunk
 java.lang.String toString()
          Return a string representation of this chunk, using the segment file format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

srcFile

public java.lang.String srcFile

startTime

public double startTime

length

public double length

comment

public java.lang.String comment
Constructor Detail

Chunk

public Chunk(java.lang.String sf,
             double st,
             double l)
Chunk constructor

Method Detail

getSamples

public double[] getSamples(javax.sound.sampled.AudioFormat format)
                    throws java.io.IOException,
                           javax.sound.sampled.UnsupportedAudioFileException
Load samples corresponding to this Chunk

Throws:
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException

compareTo

public int compareTo(java.lang.Object o)
              throws java.lang.ClassCastException
Compare one Chunk to another - comparisons are performed based on srcFile and then startTime fields.

Specified by:
compareTo in interface java.lang.Comparable
Throws:
java.lang.ClassCastException

toString

public java.lang.String toString()
Return a string representation of this chunk, using the segment file format.