Re: ExtAudioFileRead() Long Lag On First Call
Re: ExtAudioFileRead() Long Lag On First Call
- Subject: Re: ExtAudioFileRead() Long Lag On First Call
- From: "Puhl, Scott" <email@hidden>
- Date: Wed, 28 Feb 2007 22:25:32 -0600
- Thread-topic: Re: ExtAudioFileRead() Long Lag On First Call
Title: Re: ExtAudioFileRead() Long Lag On First Call
Assemble the URL, and you'll find an XCode project which demonstrates the laaaaaaaaag.
www.muddle -SNIP-
geist.com/devtritus -SNIP-
/ExtendedAudioFileTest.zip
Pardon the address obfuscation. I'm paranoid of robots.
-----Original Message-----
From: Puhl, Scott
Sent: Wed 2/28/2007 10:06 PM
To: email@hidden
Cc:
Subject: 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