Re: Inconsistencies with large WAV file
Re: Inconsistencies with large WAV file
- Subject: Re: Inconsistencies with large WAV file
- From: tahome izwah <email@hidden>
- Date: Wed, 2 Dec 2009 21:15:09 +0100
Thanks Doug, that makes a lot of sense. But doesn't that mean that
there isn't a simple workaround? Any recommendation you could give?
Thanks, very much appreciated!
--th
2009/12/2 Doug Wyatt <email@hidden>:
> Yeah, I thought about this last night and should have posted this then...
>
> AudioFile seems to be doing this with the file Tahome described:
>
> num_channels = 5;
> bytes_per_sample = 2; // 16-bit
> bytes_per_frame = num_channels * bytes_per_sample; // 10
> num_bytes_in_file = SInt64( UInt32( chunk.size ) );
> // I think this type conversion is being sign-extended incorrectly, accounting for the bug
> num_packets_in_file = num_bytes_in_file / bytes_per_frame;
>
>>>> (0x100000000 - 60672553*10) / 10
> 368824176
>
> which still isn't exactly what he said the correct value is but is much closer.
>
> Doug
>
_______________________________________________
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