Sharkysoft home

lava.riff.wave
Class WaveAdtlChunkReader

java.lang.Object
  |
  +--lava.riff.wave.WaveAdtlChunkReader

public class WaveAdtlChunkReader
extends java.lang.Object

Parses associated data list chunk.

Details: A WaveAdtlChunkReader parses and decodes certain elements from a wave stream's ADTL (Associated Data List) chunk. This can be useful for decoding cue point information.


Method Summary
 RiffChunkReader getInformationChunk(int cuename, int tag)
          Looks up information chunk.
 java.lang.String getLabel(int cuename)
          Looks up cue point label.
 java.lang.String getNote(int cuename)
          Looks up cue point note.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInformationChunk

public RiffChunkReader getInformationChunk(int cuename,
                                           int tag)
                                    throws java.io.IOException
Looks up information chunk.

Details: getInformationChunk searches through this ADTL for the first inner chunk whose cue name is cuename and whose tag is tag. If found, a RiffChunkReader that reads from the located chunk is returned; otherwise, null is returned.

This method assumes that the first field in the chunk being sought is dwName, or the name field which identifies the chunk's cue point association. This assumption is true for LABL, NOTE, LTXT, and FILE chunks, but it may not be true for other types of other inner chunks that could possibly be present in the ADTL. The returned RiffChunkReader is positioned immediately after the dwName field when it is returned.

Parameters:
cuename - cue name
tag - chunk type tag
Returns:
the chunk, if found
Throws:
java.io.IOException - if an I/O error occurs

getLabel

public java.lang.String getLabel(int cuename)
                          throws java.io.IOException
Looks up cue point label.

Details: getLabel returns the label associated with the given cue point name (cuename). If the label cannot be found, null is returned.

Parameters:
cuename - cue name
Returns:
label
Throws:
java.io.IOException - if an I/O error occurs

getNote

public java.lang.String getNote(int cuename)
                         throws java.io.IOException
Looks up cue point note.

Details: getNote returns the note associated with the given cue point name (cuename). If the note cannot be found, null is returned.

Parameters:
cuename - cue name
Returns:
note

Sharkysoft home