Re: Audio glitches during playback thru Remote IO unit (iPhone)
Re: Audio glitches during playback thru Remote IO unit (iPhone)
- Subject: Re: Audio glitches during playback thru Remote IO unit (iPhone)
- From: "Zhiye (Sterling) Li" <email@hidden>
- Date: Wed, 12 Aug 2009 09:59:17 -0500
Hi Tahome,
Thanks for your reply. I made a NSThread method where I use the AudioFileReadPackets() to read data to a double buffered queue, and now in the playback callback function it only calls the thread method when the buffer needs to be updated.
It's my thread method:
// File Reader thread
-(void)readData {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
// Double buffer stuff.
// Read file.
AudioFileReadPackets ( )
[pool release];
}
However, it didn't sound much better. I've also changed the thread priority number for both the render thread and the file reader thread that I made, it happened that the results were a little bit different, but it's just the matter of more glitches or less. So maybe there is a better way to do the file reader thread? Do you or anyone have any reader thread example that I can learn from?
Thanks!
Zhiye
On Wed, Aug 12, 2009 at 2:02 AM, tahome izwah
<email@hidden> wrote:
I think it is discouraged to do synchronous reads within a render
callback. You should have a separate reader thread and queue up your
audio buffers in memory until they are needed for playback.
--th
_______________________________________________
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 sterling.li@gmail.com
_______________________________________________
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