edu.harvard.hul.ois.jhove.module.wave
Class SampleChunk

java.lang.Object
  extended by edu.harvard.hul.ois.jhove.module.iff.Chunk
      extended by edu.harvard.hul.ois.jhove.module.wave.SampleChunk

public class SampleChunk
extends Chunk

Implementation of the WAVE Sample (or Sampler) Chunk, which gives information about a MIDI sample.

Author:
Gary McGath

Field Summary
 
Fields inherited from class edu.harvard.hul.ois.jhove.module.iff.Chunk
_dstream, _module, bytesLeft
 
Constructor Summary
SampleChunk(ModuleBase module, ChunkHeader hdr, java.io.DataInputStream dstrm)
          Constructor.
 
Method Summary
 boolean readChunk(RepInfo info)
          Reads a chunk and puts a Sample property into the RepInfo object.
 
Methods inherited from class edu.harvard.hul.ois.jhove.module.iff.Chunk
byteBufString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleChunk

public SampleChunk(ModuleBase module,
                   ChunkHeader hdr,
                   java.io.DataInputStream dstrm)
Constructor.

Parameters:
module - The WaveModule under which this was called
hdr - The header for this chunk
dstrm - The stream from which the WAVE data are being read
Method Detail

readChunk

public boolean readChunk(RepInfo info)
                  throws java.io.IOException
Reads a chunk and puts a Sample property into the RepInfo object. It isn't clear whether multiple Sample chunks are allowed (representing different sound samples for different notes or note ranges). This module assumes they are, so it constructs a Samples property, consisting of a list of Sample properties.

Specified by:
readChunk in class Chunk
Parameters:
info - RepInfo object to receive information
Returns:
false if the chunk is structurally invalid, otherwise true
Throws:
java.io.IOException