Re: AudioConverterFillComplexBuffer failure
Re: AudioConverterFillComplexBuffer failure
- Subject: Re: AudioConverterFillComplexBuffer failure
- From: dct <email@hidden>
- Date: Sat, 01 Aug 2009 15:13:23 -0700
This should close this thread and an earier one titled "Endless loop
running AudioConverterComplexBuffer failure".
With some testing, I discovered that an AudioConverter doesn't
completely convert an ioBuffer (i.e., ioData->mBuffers[0].mData) to
the full number of output frames possible and, in fact, it will fail
to return if so commanded--that was a surprise.
- For a ioBuffer with a single input packet I could pull slightly
more than half of
the frames contained (inputASBD.mFramesPerPacket).
- For a ioBuffer with n+1 input packets I could pull about (n
+1/2)*mFramesPerPacket.
Knowing this, I've implemented a scheme of providing n+1 input packets
at a time and pulling the number of frames contained in n input
packets; it works fine for small and relatively large ioBuffers (max
tested: ~600 KB <--> ~950 mp3 packets <--> ~ 25 sec stereo).
Don Thompson
_______________________________________________
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