Re: ExtAudioFileRead
Re: ExtAudioFileRead
- Subject: Re: ExtAudioFileRead
- From: Aran Mulholland <email@hidden>
- Date: Thu, 9 Sep 2010 11:13:21 +1000
Thanks ethan, your a legend.
that fixed it, I was unaware that ExtAudioFileRead modifies the buffer
list to return the number of samples read. Is there any documentation
for this behaviour that you know of, or did you just discover this by
accident?
On Thu, Sep 9, 2010 at 10:52 AM, Ethan Funk <email@hidden> wrote:
> ExtAudioFileRead also modified your buffer list to indicate the data
> written. You need to restore that as well after each call if you want to
> re-use the buffer.
> Here is an example from my code:
> err = ExtAudioFileRead(parent->exafile, &frameCount, parent->sourceBuffer);
> if(err == noErr){
> < .... do stuff here with sample data after looking at frameCount to detect
> reaching the file end... >
> }
> // restore sourceBuffer size counts
> for(UInt32 i=0 ; i<parent->sourceBuffer->mNumberBuffers ; i++)
> parent->sourceBuffer->mBuffers[i].mDataByteSize = buffSizeFrames * sizeof(float);
> Where buffSizeFrames value is set when I created the buffer to buffers' the
> capacity in frames.
>
> Ethan...
_______________________________________________
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