quicktime.sound
Class SoundComponentData

java.lang.Object
  |
  +--quicktime.util.QTByteObject
        |
        +--quicktime.sound.SoundComponentData
All Implemented Interfaces:
quicktime.jdirect.PrimitivesLib, java.io.Serializable, quicktime.jdirect.SharedLibrary, com.apple.jdirect.SharedLibrary

public final class SoundComponentData
extends QTByteObject
implements quicktime.jdirect.PrimitivesLib

See Also:
Serialized Form

Field Summary
static int kNativeSize
          This is the size (the number of bytes) that are required for this class
 
Fields inherited from interface quicktime.jdirect.PrimitivesLib
JDirect_MacOSX, libraryInstance
 
Constructor Summary
SoundComponentData()
           
 
Method Summary
 QTPointer getBuffer()
          The buffer that contains the sound data.
 int getFlags()
          A set of bit flags whose meanings are specific to a particular sound component.
 int getFormat()
          The format of the data a sound component is producing.
 int getNumChannels()
          The number of channels of sound in the output data stream.
 int getSampleCount()
          The number of samples in the buffer pointed to by the buffer field.
 float getSampleRate()
          The sample rate for the audio data.
 int getSampleSize()
          The size, in bits, of each sample in the output data stream.
 void setBuffer(QTPointer buffer)
          The buffer that contains the sound data.
 void setFlags(int flags)
          A set of bit flags whose meanings are specific to a particular sound component.
 void setFormat(int format)
          The format of the data a sound component is producing.
 void setNumChannels(int chans)
          The number of channels of sound in the output data stream.
 void setSampleCount(int sampleCount)
          The number of samples in the buffer pointed to by the buffer field.
 void setSampleRate(float sampleRate)
          The sample rate for the audio data.
 void setSampleSize(int sampleSize)
          The size, in bits, of each sample in the output data stream.
 java.lang.String toString()
          Returns a String representation of this object.
 
Methods inherited from class quicktime.util.QTByteObject
equals, fromArray, getBytes, getSize
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

kNativeSize

public static final int kNativeSize
This is the size (the number of bytes) that are required for this class
Constructor Detail

SoundComponentData

public SoundComponentData()
Method Detail

getFlags

public final int getFlags()
A set of bit flags whose meanings are specific to a particular sound component.

setFlags

public final void setFlags(int flags)
A set of bit flags whose meanings are specific to a particular sound component.

getFormat

public final int getFormat()
The format of the data a sound component is producing.

setFormat

public final void setFormat(int format)
The format of the data a sound component is producing.

getNumChannels

public final int getNumChannels()
The number of channels of sound in the output data stream.

setNumChannels

public final void setNumChannels(int chans)
The number of channels of sound in the output data stream.

getSampleSize

public final int getSampleSize()
The size, in bits, of each sample in the output data stream.

setSampleSize

public final void setSampleSize(int sampleSize)
The size, in bits, of each sample in the output data stream.

getSampleRate

public final float getSampleRate()
The sample rate for the audio data.

setSampleRate

public final void setSampleRate(float sampleRate)
The sample rate for the audio data.

getSampleCount

public final int getSampleCount()
The number of samples in the buffer pointed to by the buffer field. For compressed sounds, this field indicates the number of compressed samples in the sound, not the size of the buffer.

setSampleCount

public final void setSampleCount(int sampleCount)
The number of samples in the buffer pointed to by the buffer field. For compressed sounds, this field indicates the number of compressed samples in the sound, not the size of the buffer.

getBuffer

public final QTPointer getBuffer()
The buffer that contains the sound data.

setBuffer

public final void setBuffer(QTPointer buffer)
                     throws SoundException
The buffer that contains the sound data. If the size of the incoming buffer is less than (getSampleSize() / 8 * getSampleCount()) a paramErr exception is thrown as the buffer is not large enough to hold the specified samples. This also means that the sample size and sample count fields must be set before the buffer is set.

toString

public java.lang.String toString()
Returns a String representation of this object.
Overrides:
toString in class QTByteObject
Returns:
a String