Re: ExtAudioFile 4GB file size limitation on WAV files
Re: ExtAudioFile 4GB file size limitation on WAV files
- Subject: Re: ExtAudioFile 4GB file size limitation on WAV files
- From: Richard Dobson <email@hidden>
- Date: Sat, 30 Apr 2011 12:33:43 +0100
On 30/04/2011 11:25, tahome izwah wrote:
Hi all,
my app has to create very large WAV files (several hours of audio) in
a 24bit PCM stereo WAV compliant format.
Now, ExtAudioFile seems to support writing only PCM WAV files that are
4.3 GB or less. Is there any way to avoid this restriction (after all,
there is an extension to WAV that allows for larger files) or is this
something that we have to live with? Any trick to make EAF use
extended WAV instead?
I am aware that CAF (and other) file formats don't have this
restriction, but for reasons that are beyond my control we need to
produce files that are in plain M$ WAV format.
Sadly the anwser is simple - you can't. WAVE (and also the AIFF family)
use 32bit numbers to hold chunk sizes in bytes, which gives you the 4GB
limit (not even 4.3GB). Yes, there are alternatives that have been
invented - RF64 being one (endorsed by the AES and EBU despite being IMO
a bad design which breaks all sorts of rules, but is touted as backwards
compatible with WAVE), and w64 which is ex Sonic Foundry and is
preferable as a relatively if under-documented clean design; but there
is as far as I can tell little support for either of these outside the
broadcast community. Probably the big apps such as Nuendo support them.
Note that even 24bit WAVE is now beyond the original WAVE specification
- it has to be in WAVEFORMATEXTENSIBLE format. Perhaps that is what you
meant by "an extension"? - but it is still limited to 32bit sizes, and
hence to the 4GB limit.
So while you say the reasons are outside your control, they are actually
outside anyone's control - you can't create a 5GB PCM WAVE file simply
because someone in a state of ignorance or obstinacy tells you to! Laws
of physics, etc...
The only thing you could conceivably do is (with suitable software...)
to record each channel to separate WAVE files, giving you an 8GB
capacity. You would of course similarly have to find or engineer a
playback tool which will interleave them back into a stereo stream.
Richard Dobson
_______________________________________________
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