Re: AudioConverterConvertBuffer
Re: AudioConverterConvertBuffer
- Subject: Re: AudioConverterConvertBuffer
- From: Brad Ford <email@hidden>
- Date: Mon, 6 Nov 2006 09:41:14 -0800
On Nov 5, 2006, at 3:38 PM, Matthew Johnson wrote:
Hi,
I am trying to use a ioproc added to the default input device with
the format:
SampleRate = 44100
FormatFlags = 00000009
BytesPerPacket = 8
FramesPerPacket = 1
ChannelsPerFrame = 2
BytesPerFrame = 8
BitsPerChannel = 32
with AudioConverterConvertBuffer to convert from the above to :
SampleRate = 8000
BytesPerPacket = 2
FramesPerPacket = 1
ChannelsPerFrame = 1
BytesPerFrame = 2
BitsPerChannel = 16
with the ultimate goal of then converting those 8kHz 16 bit
integers samples
to U-Law 2:1, Mono, 8.000 kHz.
Matthew,
AudioConverters don't do mixing. Looks like you're trying to go from
Stereo-> Mono. You'd need to build a chain of:
AudioConverter (for decode) -> mixer (for mixdown) -> AudioConverter
(for encode).
Or use QuickTime's SCAudio component (SCAudioFillBuffer), which
builds this chain for you and provides an
AudioConverterFillComplexBuffer style interface. It's in
QuickTimeComponents.h. Sample code available on developer.apple.com,
see "scaudiocompress".
-Brad Ford
QuickTime Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden