Re: ExtAudioFileRead
Re: ExtAudioFileRead
- Subject: Re: ExtAudioFileRead
- From: Ethan Funk <email@hidden>
- Date: Wed, 8 Sep 2010 17:52:44 -0700
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