Re: Slow seeking in MP3 files using ExtAudioFile
Re: Slow seeking in MP3 files using ExtAudioFile
- Subject: Re: Slow seeking in MP3 files using ExtAudioFile
- From: William Stewart <email@hidden>
- Date: Tue, 20 Jan 2009 16:01:56 -0800
and to offset that, we have properties that provide you with a
conservative estimate of these values - this avoids reading the file
in in this case, but in the case of MP4 or CAF provides the same
result as the estimation is not needed (the data is explicit in these
files)
On Jan 20, 2009, at 2:46 PM, Jeff Moore wrote:
Asking the underlying AudioFile for any of the properties that need
a packet table would suffice to force the packet table to be
created. Examples of that are kAudioFilePropertyAudioDataPacketCount
and kAudioFilePropertyMaximumPacketSize. Both of these properties
require the full packet table for the file.
On Jan 20, 2009, at 2:30 PM, Jens Alfke wrote:
On Jan 20, 2009, at 2:11 PM, Jeff Moore wrote:
BTW, the parsing of the file should only happen the first time you
seek to a position. The AudioFile implementation is supposed to be
building a packet table in memory as it parses the file. So the
second time you seek, it shouldn't require parsing from the
beginning again provided the file hasn't been closed in the
meantime.
Thanks for the info! Maybe I should force this to happen on a
background thread for all the audio tracks when a document is
opened, then, to warm everything up. I found earlier that asking
for the audio file's duration is very slow, maybe because that
requires building this entire table; I've been avoiding that call,
but I could use it on the background thread.
Is that packet table accessible through any APIs (i.e. for
persistent storage) or is it purely internal to ExtAudioFile?
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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
_______________________________________________
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