• 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: Core Audio playback precision on iOS devices (and simulator)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Audio playback precision on iOS devices (and simulator)


  • Subject: Re: Core Audio playback precision on iOS devices (and simulator)
  • From: Antonio Nunes <email@hidden>
  • Date: Fri, 16 Jul 2010 17:59:01 +0100

On 16 Jul 2010, at 16:37, Kyle Sluder wrote:

> "Precision" and "usleep()" don't mix. It looks like your -driver
> method is trying to play catch-up with your realtime audio thread? If
> you wind up sleeping for long enough in the call to usleep() to
> exhaust the stack of samples, you're going to start lagging.

Actually, I put the usleep in only at a later stage, to see if lightening the driver thread's cpu load made any difference on performance. But I get the exact same measurements whether without usleep, or with usleep(1) or usleep(2), or, for that matter (with the current setup of one tick per second), even usleep(1000) or more.

If the driver thread had a hard time keeping up with the realtime thread, then the realtime thread would consume more samples than the driver could deliver, and sleep would never (or seldom) be called. But sleep is called frequently, which means that the driver thread easily fills up the buffer faster than the real time thread can consume it. This makes sense, since the load for getting the samples is is very light.

Also, if the speed at which the driver thread runs were the issue, then I would expect worse performance on the iPad than on the Core i5 iMac. But the opposite is true.

António

-----------------------------------------------------------
Some things have to be believed to be seen.

--Ralph Hodgson
-----------------------------------------------------------



 _______________________________________________
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: 
 >Core Audio playback precision on iOS devices (and simulator) (From: Antonio Nunes <email@hidden>)
 >Re: Core Audio playback precision on iOS devices (and simulator) (From: Kyle Sluder <email@hidden>)

  • Prev by Date: skips in file using ExtAudioFileWrite in aac
  • Next by Date: Re: Core Audio playback precision on iOS devices (and simulator)
  • Previous by thread: Re: Core Audio playback precision on iOS devices (and simulator)
  • Next by thread: Re: Core Audio playback precision on iOS devices (and simulator)
  • Index(es):
    • Date
    • Thread