SoundComponentData to AudioStreamBasicDescription
SoundComponentData to AudioStreamBasicDescription
- Subject: SoundComponentData to AudioStreamBasicDescription
- From: Lieven Dekeyser <email@hidden>
- Date: Wed, 16 Jan 2002 01:55:51 +0100 (CET)
Hi!
I use QuickTime's SoundConverter API to convert sound files to Float32
format. To set the SoundConverter's output format, the structure
SoundComponentData is used. Now I'd like to be able to set the
AudioStreamBasicDescription of my destination AudioUnit to the exact same
format, but It seems to me that SoundComponentData is less specific than
AudioStreamBasicDescription.
does anyone know what mBytesPerPacket, mBytesPerFrame, mChannelsPerFrame
and mBitsPerChannel should be in the AudioStreamBasicDescription with the
output format of the SoundConverter set to:
SoundComponentData outputFormat = {
kExtendedSoundData, // flags
kFloat32Format, // format
2, // numChannels
32, // sampleSize
rate44khz, // sampleRate
0, // sampleCount
0, // buffer
0 // reserved
};
It works perfectly when I copy the converted buffers in the default output
AudioDevice's IOProc with the kAudioDevicePropertyBufferSize set to the
size of the converted buffers, but I'd like to use them in an AudioUnit's
InputCallback, and as there's no BufferSize property for AudioUnits...
thanks,
--Lieven