• 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
ExtAudioFileRead sometimes slow on iPhone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ExtAudioFileRead sometimes slow on iPhone


  • Subject: ExtAudioFileRead sometimes slow on iPhone
  • From: Evan Olcott <email@hidden>
  • Date: Tue, 7 Sep 2010 11:23:22 -0500

Source audio file is an IMA4 compressed .aif, opened with the ExtAudioFile API. Reading from the file with ExtAudioFileRead into buffers either 128k or 48k (tried both) on a high-priority thread (NOT the CoreAudio thread and NOT the main thread).

When the read is going on on this disk thread, occasionally the RENDER thread will starve and stutters will happen. I can confirm that sometimes ExtAudioFileRead takes ~40ms and sometimes it takes >250ms (for the 128k size) and this correlates with the audible stutters.

I do NOT get stutters on an iPad, but I DO get them on an iPhone 4. I have not thoroughly checked with other devices.

AFAIK, I can't check the I/O telemetery like I can on the desktop and I'm hesitant to add log messages to the render thread to find out when it starves, so I'm not sure how to go about debugging this. Is this a known issue? Is there an issue reading & decoding IMA4 files quickly? Why would my reading of a file on one thread affect the rendering thread? Are there debugging techniques I can apply to devices to track this down?

I'll keep trying to find any correlation with locks and such, but I wanted to ask here because it seems to be a hardware-style issue if an iPhone 4 (which AFAIK is *faster*) can't keep up with the reading & decoding compared to an iPad.

Thanks in advance for any help.


Ev
Senior Software Architect
Audiofile Engineering

http://www.audiofile-engineering.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

  • Follow-Ups:
    • Re: ExtAudioFileRead sometimes slow on iPhone
      • From: Doug Wyatt <email@hidden>
  • Prev by Date: Re: help: input only AUHAL AudioUnitRender returns kAudioUnitErr_CannotDoInCurrentContext after sample rate change
  • Next by Date: Re: ExtAudioFileRead sometimes slow on iPhone
  • Previous by thread: Re: AudioQueue sample time
  • Next by thread: Re: ExtAudioFileRead sometimes slow on iPhone
  • Index(es):
    • Date
    • Thread