• 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() Long Lag On First Call
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ExtAudioFileRead() Long Lag On First Call


  • Subject: ExtAudioFileRead() Long Lag On First Call
  • From: "Puhl, Scott" <email@hidden>
  • Date: Wed, 28 Feb 2007 22:06:21 -0600
  • Thread-topic: ExtAudioFileRead() Long Lag On First Call

Title: ExtAudioFileRead() Long Lag On First Call

I'm finding the first call to ExtAudioFileRead() on a freshly opened ExtAudioFileRef consistently takes about 9 seconds to return.  All subsequent calls are measured in a few milliseconds.

Is this normal?

<code>
OSStatus extAF_OpenStatus = ExtAudioFileOpen( threadDataPtr->fsRefPtr, &extFileRef );
                               
OSStatus extAF_SetClientDataFormatStatus  = ExtAudioFileSetProperty( extFileRef, kExtAudioFileProperty_ClientDataFormat, sizeof(AudioStreamBasicDescription), &outputASBD );

...

err = ExtAudioFileRead( extFileRef, &requestFrames, ioData);
</code>

The outputASBD is filled out to LPCM by a call to AUBase::GetStreamFormat( kAudioUnitScope_Output, 0 ).

The requestFrames and ioData arguments to ExtAudioFileRead are from an AudioUnit's Render() call.

I have a c++ project for a simple command line tool that demonstrates this.  I'll find somewhere to post it if anyone is interested.

Adding several separate ExtAudioFileRef instances all pointing to the same file and calling ExtAudioFileRead() from serveral separate threads makes the lags even longer.  Yuck.

I know ExtAudioFileRead() is synchronous, but should it be 9 seconds synchronous?

Thanks,

Scott

 

 _______________________________________________
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() Long Lag On First Call
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: CoreAudio for Windows
  • Next by Date: Re: ExtAudioFileRead() Long Lag On First Call
  • Previous by thread: Re: CoreAudio for Windows
  • Next by thread: Re: ExtAudioFileRead() Long Lag On First Call
  • Index(es):
    • Date
    • Thread