Inside Macintosh: QuickTime Reference
| Previous | Chapter Contents | Chapter Top | Next |
In addition to two new SoundManagerGetInfo and SoundManagerSetInfo calls, there is a new Sound Converter API in QuickTime 4.1, which is discussed in the next section. Note that this new API is now the recommended way to use the Sound Converter.
This routine retrieves global information about the Sound Manaager.
This routine sets global information about the Sound Manager.
Provides an alternative method for converting data using the Sound Converter, which is both more predictable and more flexible than the SoundConverterConvertBuffer mechanism. The SoundConverterFillBuffer function can return any Sound Manager error.
pascal OSErr SoundConverterFillBuffer( SoundConverter sc,
SoundConverterFillBufferDataUPP fillBufferDataUPP,
void* fillBufferDataRefCon,
void* outputBuffer,
unsigned long outputBufferByteSize,
unsigned long* bytesWritten,
unsigned long* framesWritten,
unsigned long* outputFlags
)
-
sc
-
The Sound Converter context to work with (created with SoundConverterOpen).
-
fillBufferDataUPP
-
-
A UPP that points to a routine that can provide data to the Sound Converter.
-
fillBufferDataRefCon
-
-
This value is passed to the SoundConverterFillBufferDataUPP. It can be used for any purpose the client wishes.
-
outputBuffer
-
-
The buffer to write the data into.
-
outputBufferByteSize
-
-
The size of outputBuffer in bytes. No more than this amount will ever be written during a single call to SoundConverterFillBuffer.
-
bytesWritten
-
-
Upon completion, the number of bytes that were written into outBuffer.
-
framesWritten
-
-
Upon completion, the number of sample frames written into outBuffer.
-
outputFlags
-
-
Upon completion, a set of bit flags that indicate the state of the conversion. These are the currently defined flags:
-
kSoundConverterDidntFillBuffer
-
-
Set if the converter didn't completely fill the output buffer.
-
kSoundConverterHasLeftOverData
-
-
Set if the converter still has more data to deliver. This indicates that more calls to SoundConvertFillBuffer should be made to complete the conversion. A caveat: If this flag is not set, it doesn't indicate there is necessarily more data in the pipeline. These are advisor flags only: they don't guarantee any internal data. You need to keep track of your data.
Inside Macintosh: QuickTime Reference
| Previous | Chapter Contents | Chapter Top | Next |