Re: ExtAudioFile seeking bug in m4a files?
Re: ExtAudioFile seeking bug in m4a files?
- Subject: Re: ExtAudioFile seeking bug in m4a files?
- From: William Stewart <email@hidden>
- Date: Mon, 7 Dec 2009 19:35:21 -0800
Hi Stephen
Could you please file a bug report on this?
Thanks
Bill
>> On Dec 6, 2009, at 1:59 PM, Doug Wyatt wrote:
>>
>>> That looks like a bug relating to the internal bookkeeping when you seek into the middle of a packet.
>>>
>>> The variable that isn't being maintained correctly doesn't actually affect much at all other than the number reported by Tell: it's used to try to reduce unnecessary seeking (but that in itself has another bug), and to decide when, at end-of-file, to trim trailing frames.
>>>
>>> So the workaround is simply not to use ExtAudioFileTell and keep track yourself of where you are by where you have seeked to, and how many frames you've read.
>>>
>>>
>>> On Dec 5, 2009, at 14:27 , Stephen F. Booth wrote:
>>>
>>>> I've run in to what I think is a bug in ExtAudioFile when seeking in
>>>> m4a files. Essentially, after seeking to a frame ExtAudioFileTell()
>>>> indicates the incorrect frame (off by the number of priming frames as
>>>> elucidated by Doug Wyatt earlier this month) and subsequent calls to
>>>> ExtAudioFileRead() followed by ExtAudioFileTell() give even stranger
>>>> results:
>>>>
>>>> 2009-12-05 14:14:45.958 EAFBug[349:a0f] Tell after opening: -2112
>>>> 2009-12-05 14:14:45.960 EAFBug[349:a0f] Tell after reading 2048 frames: -64
>>>> 2009-12-05 14:14:45.960 EAFBug[349:a0f] Tell after reading 2048 frames: 1984
>>>> 2009-12-05 14:14:45.960 EAFBug[349:a0f] Tell after reading 2048 frames: 4032
>>>> 2009-12-05 14:14:45.960 EAFBug[349:a0f] Tell after reading 2048 frames: 6080
>>>> 2009-12-05 14:14:45.960 EAFBug[349:a0f] Tell after reading 2048 frames: 8128
>>>> 2009-12-05 14:14:45.961 EAFBug[349:a0f] Tell after reading 2048 frames: 10176
>>>> 2009-12-05 14:14:45.961 EAFBug[349:a0f] Tell after reading 2048 frames: 12224
>>>> 2009-12-05 14:14:45.961 EAFBug[349:a0f] Tell after reading 2048 frames: 14272
>>>> 2009-12-05 14:14:45.961 EAFBug[349:a0f] Tell after reading 2048 frames: 16320
>>>> 2009-12-05 14:14:45.961 EAFBug[349:a0f] Tell after reading 2048 frames: 18368
>>>> 2009-12-05 14:14:45.962 EAFBug[349:a0f] Tell after seeking to 220500: 218388
>>>> 2009-12-05 14:14:45.977 EAFBug[349:a0f] Tell after reading 2048 frames: 222888
>>>> 2009-12-05 14:14:45.977 EAFBug[349:a0f] Tell after reading 2048 frames: 224936
>>>> 2009-12-05 14:14:45.977 EAFBug[349:a0f] Tell after reading 2048 frames: 226984
>>>> 2009-12-05 14:14:45.977 EAFBug[349:a0f] Tell after reading 2048 frames: 229032
>>>> 2009-12-05 14:14:45.978 EAFBug[349:a0f] Tell after reading 2048 frames: 231080
>>>> 2009-12-05 14:14:45.978 EAFBug[349:a0f] Tell after reading 2048 frames: 233128
>>>> 2009-12-05 14:14:45.978 EAFBug[349:a0f] Tell after reading 2048 frames: 235176
>>>> 2009-12-05 14:14:45.978 EAFBug[349:a0f] Tell after reading 2048 frames: 237224
>>>> 2009-12-05 14:14:45.979 EAFBug[349:a0f] Tell after reading 2048 frames: 239272
>>>> 2009-12-05 14:14:45.979 EAFBug[349:a0f] Tell after reading 2048 frames: 241320
>>>>
>>>> I have not yet checked to see if the frames returned immediately after
>>>> a seek are the correct ones.
>>>>
>>>> For comparison, here is the same code run on an AIFF file:
>>>>
>>>> 2009-12-05 14:14:55.526 EAFBug[349:a0f] Tell after opening: 0
>>>> 2009-12-05 14:14:55.527 EAFBug[349:a0f] Tell after reading 2048 frames: 2048
>>>> 2009-12-05 14:14:55.527 EAFBug[349:a0f] Tell after reading 2048 frames: 4096
>>>> 2009-12-05 14:14:55.527 EAFBug[349:a0f] Tell after reading 2048 frames: 6144
>>>> 2009-12-05 14:14:55.528 EAFBug[349:a0f] Tell after reading 2048 frames: 8192
>>>> 2009-12-05 14:14:55.528 EAFBug[349:a0f] Tell after reading 2048 frames: 10240
>>>> 2009-12-05 14:14:55.528 EAFBug[349:a0f] Tell after reading 2048 frames: 12288
>>>> 2009-12-05 14:14:55.528 EAFBug[349:a0f] Tell after reading 2048 frames: 14336
>>>> 2009-12-05 14:14:55.528 EAFBug[349:a0f] Tell after reading 2048 frames: 16384
>>>> 2009-12-05 14:14:55.529 EAFBug[349:a0f] Tell after reading 2048 frames: 18432
>>>> 2009-12-05 14:14:55.529 EAFBug[349:a0f] Tell after reading 2048 frames: 20480
>>>> 2009-12-05 14:14:55.529 EAFBug[349:a0f] Tell after seeking to 220500: 220500
>>>> 2009-12-05 14:14:55.536 EAFBug[349:a0f] Tell after reading 2048 frames: 222548
>>>> 2009-12-05 14:14:55.536 EAFBug[349:a0f] Tell after reading 2048 frames: 224596
>>>> 2009-12-05 14:14:55.536 EAFBug[349:a0f] Tell after reading 2048 frames: 226644
>>>> 2009-12-05 14:14:55.537 EAFBug[349:a0f] Tell after reading 2048 frames: 228692
>>>> 2009-12-05 14:14:55.537 EAFBug[349:a0f] Tell after reading 2048 frames: 230740
>>>> 2009-12-05 14:14:55.537 EAFBug[349:a0f] Tell after reading 2048 frames: 232788
>>>> 2009-12-05 14:14:55.537 EAFBug[349:a0f] Tell after reading 2048 frames: 234836
>>>> 2009-12-05 14:14:55.537 EAFBug[349:a0f] Tell after reading 2048 frames: 236884
>>>> 2009-12-05 14:14:55.537 EAFBug[349:a0f] Tell after reading 2048 frames: 238932
>>>> 2009-12-05 14:14:55.538 EAFBug[349:a0f] Tell after reading 2048 frames: 240980
>>>>
>>>> I'm happy to post my code, but I wasn't sure if this is a known issue
>>>> or if I am doing something wrong.
>>>>
>>>>
>>>> I'm running 10.6.2 on a MacBook Pro.
>>>>
>>>> Stephen
>>>> _
_______________________________________________
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