quicktime.sound
Class SndInfo
java.lang.Object
|
+--quicktime.sound.SndInfo
- All Implemented Interfaces:
- quicktime.jdirect.InterfaceLib, quicktime.jdirect.SharedLibrary, com.apple.jdirect.SharedLibrary, quicktime.jdirect.SoundLib
- public final class SndInfo
- extends java.lang.Object
- implements quicktime.jdirect.SoundLib, quicktime.jdirect.InterfaceLib
This class returns Sound Header information as parsed from an Snd resource
or an AIFF Sound file
Fields inherited from interface quicktime.jdirect.SoundLib |
JDirect_MacOSX, libraryInstance |
Fields inherited from interface quicktime.jdirect.InterfaceLib |
JDirect_MacOSX, libraryInstance |
Method Summary |
static SndInfo |
parseAIFFHeader(OpenFile file)
You use this function to retrieve information about from a AIFF Sound File. |
static void |
setupAIFFHeader(OpenFile file,
int numChannels,
float sampleRate,
int sampleSize,
int compressionType,
long numBytes,
long numFrames)
The SetupAIFFHeader function creates an AIFF or AIFF-C file header, depending on the parameters passed to it:
Uncompressed sounds of any type are stored in AIFF format (that is, the compressionType parameter is 'NONE'). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sndData
public SoundComponentData sndData
- The general characteristics of the sound data
numFrames
public int numFrames
- The number of frames in the sample
dataOffset
public int dataOffset
- The offset to the sound data
setupAIFFHeader
public static void setupAIFFHeader(OpenFile file,
int numChannels,
float sampleRate,
int sampleSize,
int compressionType,
long numBytes,
long numFrames)
throws SoundException
- The SetupAIFFHeader function creates an AIFF or AIFF-C file header, depending on the parameters passed to it:
Uncompressed sounds of any type are stored in AIFF format (that is, the compressionType parameter is 'NONE').
Compressed sounds of any type are stored in AIFF-C format (that is, the compressionType parameter is different from 'NONE').
- Parameters:
file
- the open file to parsenumChannels
- The number of channels for the sound; one channel is equivalent to monaural sound and two channels are equivalent to stereo sound.sampleRate
- The rate at which the sound was recorded.sampleSize
- The sample size for the original sound (that is, bits per sample).compressionType
- The compression type for the sound ('NONE', 'MAC3', 'MAC6', or other third-party types).numBytes
- The number of bytes of audio data that are to be stored in the Common Chunk of the AIFF or AIFF-C file. Max value is a 32-bit unsigned int.numFrames
- The number of sample frames for the sample sound. If you are using a compression type defined by Apple, you can pass 0 in this field and the appropriate value for this field will be computed automatically. Max value is a 32-bit unsigned int.
parseAIFFHeader
public static SndInfo parseAIFFHeader(OpenFile file)
throws SoundException
- You use this function to retrieve information about from a AIFF Sound File.
QuickTime::ParseAIFFHeader
- Parameters:
file
- the open file to parse- Returns:
- a SndInfo object