[music-dsp] wav file format at different bitrates
Peter Segerdahl
peter at vinga.se
Wed Jan 10 11:21:31 EST 2001
Thanks for the reply!
Start by looking for a paper called "Enhanced Audio Formats for
Multi-Channel Configurations and High-Bit Resolution" on the Microsoft
web site. This gives an overview of the problems with the standard WAV
format and propose a new format that covers bit depth, float support and
multi-channel support. I assume this has now been adopted by the
industry as its been around for a while but I haven't done much
checking.
thanks, I found it.
You get both 32 bit floats and ints. For ints this is more an
indication of the container size rather than the number of valid bits
(which would be < 24). A reason for having the larger container size is
that it allows faster streaming of disk to soundcard in certain
circumstances at the cost of greater hard disk space.
so 4 byte ints are not that common or perhaps never even used (except
for handling faster streaming with 24-bits)?
Float is 32 bit. Double is 64 bit.
of course, I made a typo.
I would heartily recommend using 32bit floats internally.
well my main concern about this was that if I do then I wont be able to
import/export 32 bit ints (presuming the data is 32-bit and not 24 bit)
as converting to and from 4 bytes true 32-bit sample data and 4 bytes
32-bit floats would be destructive.
Or am I wrong here?
Therefore I thought 8 bytes 64 but double were the road to chose but at
the same time I was a little scared about the "waste" of RAM as 16 bit
ints are still the most common format to import and export...
The FPU units on today's microprocessors (apart from P4 unless you use
SIMD I think?) make using ints a bit silly. I think float has a slight
edge on double because of memory bandwidth but obviously double has more
precision. In answer to your question, the float data should be +/- 1.0
This means that any float data should be +/- 1.0. I mean both 4 bytes
and 8 bytes (float and double)?
I recommend using the following library:
<http://www.zip.com.au/~erikd/libsndfile/>
http://www.zip.com.au/~erikd/libsndfile/
I does everything you want plus more except for multi-channel (above
stereo).
Thanks, I wont use it but it could be a good source for information.
/Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://music.columbia.edu/pipermail/music-dsp/attachments/20010110/3d91fcea/attachment-0002.html
More information about the music-dsp
mailing list