|
Sharkysoft home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--lava.riff.wave.WaveCuePointList
Parses cue point list.
Details: A WaveCuePointList
parses the cue point list (contained in the cue point chunk) of a wave file and provides access to the information contained in the individual cue point structures. Instances of this class are obtained by calling
.WaveStreamReader.getCuePoints
In a given .wav file, the cue points may not be stored in any particular order. If an specific ordering is required, the client should call one of the sorting methods. Each cue point has, at the very least, an index (i.e., list order), a name (4 byte tag), and a position (i.e., offset into wave sample data). Cue points often have additional data, such as labels, recorded in a separate ADTL chunk.
Method Summary | |
int |
countCuePoints()
Counts cue points. |
int |
findLabel(java.lang.String label)
Searches for cue point label. |
java.lang.String |
getLabel(int index)
Returns cue point label. |
int |
getName(int index)
Returns cue point name. |
long |
getPosition(int index)
Returns cue point position. |
WaveCuePointList |
sortByLabel()
Sorts list by label. |
WaveCuePointList |
sortByPosition()
Sorts list by sample position. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Method Detail |
public int countCuePoints() throws java.io.IOException
Details: countCuePoints
determines the total number of cue points in this list and returns it.
public int getName(int index) throws java.io.IOException
Details: getName
returns the cue point name of the cue point whose index in the list is index.
index
- cue point indexpublic long getPosition(int index) throws java.io.IOException
Details: getPosition
returns the cue point position of the cue point whose index in the list is index.
index
- cue point indexpublic java.lang.String getLabel(int index) throws java.io.IOException
Details: getLabel
returns the cue point label of the cue point whose index in the list is index.
This method is the inverse of {@see #findLabel(java.lang.String) findLabel
}.
index
- cue point indexpublic int findLabel(java.lang.String label) throws java.io.IOException
Details: findLabel
searches through the list of cue points for the first cue point whose label is label. If found, the index of the cue point is returned.
This method is the inverse of {@see #getLabel(int) getLabel
}.
label
- cue point labelpublic WaveCuePointList sortByPosition() throws java.io.IOException
Details: sortByPosition
reads the position values of every cue point in this list, sorts the cue points in order of position, earliest first, and then creates and returns a new WaveCuePointList
instance whose cue points are in the sorted order.
public WaveCuePointList sortByLabel() throws java.io.IOException
Details: sortByLabel
reads the labels of every cue point in this list, sorts the cue points in alphabetical order, and then creates and returns a new WaveCuePointList
instance whose cue points are in the sorted order.
|
Sharkysoft home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |