• 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: William Stewart <email@hidden>
  • Date: Mon, 20 Apr 2009 12:27:49 -0700


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


  • Follow-Ups:
    • Re: Best approach for audiofile reader worker thread
      • From: Howard Moon <email@hidden>
    • Re: Best approach for audiofile reader worker thread
      • From: Mark's Studio <email@hidden>
References: 
 >Best approach for audiofile reader worker thread (From: Mark's Studio <email@hidden>)

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