Re: afInitDataOffset() bug

Michael Pruett <[email protected]> Tue, 10 Sep 2002 18:25:26 -0700
Newsgroups gmane.comp.audio.audiofile
Message-ID <[email protected]>
On Sun, Sep 08, 2002 at 01:58:37AM -0500, Davy Durham wrote:
> Hey.. I'm working on ReZound's raw format support and I noticed that 
> when afInitDataOffset() is used  when initializing the afSetup, 
> afGetFrameCount() still returns the same value as if the data offset was 
> zero.  So, you end up trying to read more frames than there are if the 
> data offset is given > 0.  
> 
> I can easily subtract the offset*frameSize from the reported frame 
> count, but I thought it would make more sense for the library to do that.  
> 
> Should I do the subtract or submit a patch which fixes the bug for raw 
> setups?

Davy, you're right.  Feel free to send me a patch.

Michael