Re: AudioCodec, ProduceOutputpackets and ioOutputDataByteSize
Re: AudioCodec, ProduceOutputpackets and ioOutputDataByteSize
- Subject: Re: AudioCodec, ProduceOutputpackets and ioOutputDataByteSize
- From: Jeff Moore <email@hidden>
- Date: Tue, 9 May 2006 11:38:02 -0700
On return, ioOutputDataByteSize is supposed to contain the number of
bytes the codec wrote to the buffer pointed to by outOutputData. If
you are writing a codec, you should always follow the semantics of
the Audio Codec API regardless of what the layers above are doing
with the values you return. You never know when those layers are
going to change, so it's best to just follow the rules here.
Also, there's no requirement that the caller of
AudioCodecProduceOutputPackets use what you return in
ioOutputDataByteSize. The reason why is that it is, in a lot of ways,
redundant information when you already know the format of the data
(and thus know the bytes per packet) or, in the case of VBR formats,
you have the packet descriptions.
On May 9, 2006, at 9:05 AM, Mike Erickson wrote:
In an AudioCodec's ProduceOutputPackets implementation, what is the
parameter ioOutputDataByteSize supposed to be filled in with? I
can set it to zero on return (or just about any number) and it
doesn't seem to make any difference in the encoded file. It seems
the rest of the graph only pays attention to ioNumberPackets. Only
paying attention to the number of packets isn't going to be correct
when encoding with a VBR scheme, is it?
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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