Re: Best approach for audiofile reader worker thread
Re: Best approach for audiofile reader worker thread
- Subject: Re: Best approach for audiofile reader worker thread
- From: William Stewart <email@hidden>
- Date: Mon, 20 Apr 2009 15:36:06 -0700
They are fine as far as I know
On Apr 20, 2009, at 2:49 PM, Howard Moon wrote:
On a related note:
is it ok to issue an asynchronous read or write from the render
callback? I'm planning on doing some reading/writing of data, using
the PBReadForkAsync() and PBWriteForkAsync() calls. But if *those*
functions might block, then I'd obviously want to handle it
differently.
Thanks,
-Howard
On Apr 20, 2009, at 12:27 PM, William Stewart wrote:
On Apr 19, 2009, at 1:20 AM, Mark's Studio wrote:
What is the best approach for setting up a audiofile reader worker
thread on the iPhone?
I need to read several files, so far it's been fine just reading
them with ExtAudioFileRead() in the render callback (small files,
linear PCM no conversion) and not on every callback,
but i also want to read some big files, and now it starts to block
the callback and i get dropouts.
well, you shouldn't be doing *any* reads on the render callback
from an audio unit chain that is doing audio device I/O
You are in a realtime thread, that has a constrained time/deadline
to meet and accessing the file system can block. (same reason for
not allocating on this thread)
The fact that you aren't glitching already - you're just getting
lucky.
Bill
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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