Re: crashing in calls to AudioConverter on 10.3.9
Re: crashing in calls to AudioConverter on 10.3.9
- Subject: Re: crashing in calls to AudioConverter on 10.3.9
- From: Doug Wyatt <email@hidden>
- Date: Wed, 29 Mar 2006 12:25:47 -0800
On Mar 28, 2006, at 18:47, Christopher Ashworth wrote:
On Mar 28, 2006, at 9:03 PM, Doug Wyatt wrote:
OSStatus MyComplexInputDataProc)(UInt32 *ioNumberDataPackets ...
AudioBufferList *ioData ...)
{
AudioBufferList abl;
abl.mNumberBuffers = 1;
abl.mBuffers[0].mNumberChannels = 1;
abl.mBuffers[0].mData = <something you malloc'd, probably earlier>;
abl.mBuffers[0].mDataByteSize = <the number of bytes you want to
get back from the file>;
AudioFileReadPackets( ... &abl ...);
*ioData = abl;
*ioNumberDataPackets = <number of frames>;
}
Er, now I'm *really* confused.
In this documentation:
http://developer.apple.com/documentation/MusicAudio/Reference/
CAAudioTooboxRef/AudioFile/Functions/Functions.html#//apple_ref/c/
func/AudioFileReadPackets
The AudioFileReadPackets function does not appear to expect a
pointer to an audio buffer list. (The description of the buffer
just describes it as being a flat block of user allocated memory.)
I'm sorry, I was thinking of ExtAudioFileRead, which takes an
AudioBufferList, but of course you're using AudioFileRead which only
takes a buffer pointer.
The important thing is, then, that on exit from your input proc,
ioData->mNumberBuffers is 1 for mono or interleaved multichannel
source data (which is what you'll always get from AudioFileRead).
Doug
--
Doug Wyatt
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