quicktime.sound
Class ExtScheduledSoundHeader

java.lang.Object
  |
  +--quicktime.QTObject
        |
        +--quicktime.util.QTPointerRef
              |
              +--quicktime.sound.ExtScheduledSoundHeader
All Implemented Interfaces:
quicktime.jdirect.InterfaceLib, quicktime.jdirect.PrimitivesLib, quicktime.jdirect.QuickTimeLib, quicktime.jdirect.SharedLibrary, com.apple.jdirect.SharedLibrary

public final class ExtScheduledSoundHeader
extends QTPointerRef
implements quicktime.jdirect.InterfaceLib


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.InterfaceLib
JDirect_MacOSX, libraryInstance
 
Fields inherited from interface quicktime.jdirect.QuickTimeLib
JDirect_MacOSX, libraryInstance, name
 
Constructor Summary
ExtScheduledSoundHeader(QTPointerRef data, int numChannels, float rate, int sampleSizeBits, int format)
          Create an ExtScheduledSoundHeader object when the sample data format is uncompressed.
ExtScheduledSoundHeader(QTPointerRef data, int numChannels, float rate, int numFrames, int sampleSizeBits, int format, int compressionID, int packetSize)
          Create an ExtScheduledSoundHeader object for use when the sample data is compressed.
ExtScheduledSoundHeader(QTPointerRef data, int numChannels, float rate, int numFrames, int sampleSizeBits, int format, int compressionID, int packetSize, TimeRecord startTime, int extendedFlags)
          Create an ExtScheduledSoundHeader object for the scheduled sound calls.
 
Method Summary
 int getCompressionID()
           
 int getExtendedFlags()
          Gets the value of the extended flags field.
 int getFormat()
           
 int getNumChannels()
          This returns the number of channels.
 int getNumFrames()
           
 int getPacketSize()
           
 QTPointerRef getSampleData()
          This returns a pointer to the sample data
 float getSampleRate()
          This method gets the sample rate of the sound
 int getSampleSize()
          This gets the size of the samples in bits per channel
 TimeRecord getStartTime()
           
 void setCompressionID(int id)
          This method sets id of the compression component associated with the sound
 void setExtendedFlags(int extFlags)
          Sets the value of the extended flags field.
 void setFormat(int format)
          This method sets format of the sound
 void setNumChannels(int numChannels)
          This sets the number of channels used by the sound data
 void setNumFrames(int frames)
          This method sets number of frames in the sound
 void setPacketSize(int size)
          This method sets the packet size of the sound
 void setSampleData(QTPointerRef ref)
          This sets the data of the sound header.
 void setSampleRate(float rate)
          Sets the sample rate of the sound
 void setSampleSize(int sampleSizeBits)
          This sets the size of the samples in bits per channel
 void setStartTime(TimeRecord startTime)
          This method sets the time that the sound should begin playing
 java.lang.String toString()
          A String representation of the class.
 
Methods inherited from class quicktime.util.QTPointerRef
copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, getBytes, getSize
 
Methods inherited from class quicktime.QTObject
disposeQTObject, equals, ID
 
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

ExtScheduledSoundHeader

public ExtScheduledSoundHeader(QTPointerRef data,
                               int numChannels,
                               float rate,
                               int sampleSizeBits,
                               int format)
                        throws QTException
Create an ExtScheduledSoundHeader object when the sample data format is uncompressed.
Parameters:
data - the data used by the sound header
numChannels - the number of channels to be used. 1 = mono, 2 = streo
rate - the sample rate of the sound data
sampleSizeBits - number of bits per each sample.

ExtScheduledSoundHeader

public ExtScheduledSoundHeader(QTPointerRef data,
                               int numChannels,
                               float rate,
                               int numFrames,
                               int sampleSizeBits,
                               int format,
                               int compressionID,
                               int packetSize)
                        throws QTException
Create an ExtScheduledSoundHeader object for use when the sample data is compressed.
Parameters:
data - the data used by the sound header
numChannels - the number of channels to be used. 1 = mono, 2 = streo
rate - the sample rate of the sound data
numFrames - the number of frames of sound data
format - the sound format described by the header
sampleSizeBits - number of bits per each sample.
compressionID - the ID of the compression component used to compress this sound
packetSize - the size of each sound packet

ExtScheduledSoundHeader

public ExtScheduledSoundHeader(QTPointerRef data,
                               int numChannels,
                               float rate,
                               int numFrames,
                               int sampleSizeBits,
                               int format,
                               int compressionID,
                               int packetSize,
                               TimeRecord startTime,
                               int extendedFlags)
                        throws QTException
Create an ExtScheduledSoundHeader object for the scheduled sound calls.
Parameters:
data - the data used by the sound header
numChannels - the number of channels to be used. 1 = mono, 2 = streo
rate - the sample rate of the sound data
numFrames - the number of frames of sound data
format - the sound format described by the header
sampleSizeBits - number of bits per each sample.
compressionID - the ID of the compression component used to compress this sound
packetSize - the size of each sound packet
startTime - a TimeRecord specifying the time the sound will start playing
extendedFlags - the extended flags field
Method Detail

getSampleData

public QTPointerRef getSampleData()
This returns a pointer to the sample data
Returns:
a QTPointerRef

setSampleData

public void setSampleData(QTPointerRef ref)
This sets the data of the sound header. The data must be passed in as a QTPointerRef
Parameters:
ref - the data pointer

getNumChannels

public int getNumChannels()
This returns the number of channels. A value of one means the sound is mono
Returns:
number of channels

setNumChannels

public void setNumChannels(int numChannels)
This sets the number of channels used by the sound data
Parameters:
numChannels - number of channels, 1 means mono

getSampleRate

public float getSampleRate()
This method gets the sample rate of the sound
Returns:
sample rate

setSampleRate

public void setSampleRate(float rate)
Sets the sample rate of the sound
Parameters:
rate - the sample rate as a floating point number

getNumFrames

public int getNumFrames()

setNumFrames

public void setNumFrames(int frames)
This method sets number of frames in the sound
Parameters:
frames - number of frames

getFormat

public int getFormat()

setFormat

public void setFormat(int format)
This method sets format of the sound
Parameters:
format - format of the sound

setSampleSize

public void setSampleSize(int sampleSizeBits)
This sets the size of the samples in bits per channel
Parameters:
sampleSizeBits - the number of bits per channel

getSampleSize

public int getSampleSize()
This gets the size of the samples in bits per channel

getCompressionID

public int getCompressionID()

setCompressionID

public void setCompressionID(int id)
This method sets id of the compression component associated with the sound
Parameters:
id - compressor id

getPacketSize

public int getPacketSize()

setPacketSize

public void setPacketSize(int size)
This method sets the packet size of the sound
Parameters:
size - size of the sound packet

getStartTime

public TimeRecord getStartTime()
                        throws QTException

setStartTime

public void setStartTime(TimeRecord startTime)
This method sets the time that the sound should begin playing
Parameters:
startTime - the time the sound should play (in the future)

getExtendedFlags

public int getExtendedFlags()
Gets the value of the extended flags field.

setExtendedFlags

public void setExtendedFlags(int extFlags)
Sets the value of the extended flags field.

toString

public java.lang.String toString()
Description copied from class: QTPointerRef
A String representation of the class.
Overrides:
toString in class QTPointerRef
Returns:
a String representation of this object