• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Best approach for audiofile reader worker thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best approach for audiofile reader worker thread


  • Subject: Re: Best approach for audiofile reader worker thread
  • From: Mark's Studio <email@hidden>
  • Date: Mon, 20 Apr 2009 22:57:52 +0200


On 20/04/2009, at 21.27, 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



Yes i know i should not block the callback that's why i asked, but the small files are maybe cached and that's why it works,

But back to the original issue, is there any difference to what kind of thread type there is used NSThred or pthread ?





Peter Mark

Mark's Recording Studio A/S
Lundeskovsvej 3
2900 Hellerup
Denmark
Tel: +45 35366078
Fax: +45 35366038
Mobile: +45 20416018
www.marks-studio.dk
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


References: 
 >Best approach for audiofile reader worker thread (From: Mark's Studio <email@hidden>)
 >Re: Best approach for audiofile reader worker thread (From: William Stewart <email@hidden>)

  • Prev by Date: Re: Best approach for audiofile reader worker thread
  • Next by Date: Re: Best approach for audiofile reader worker thread
  • Previous by thread: Re: Best approach for audiofile reader worker thread
  • Next by thread: Re: Best approach for audiofile reader worker thread
  • Index(es):
    • Date
    • Thread