Re: Calculating peak level in db
Re: Calculating peak level in db
- Subject: Re: Calculating peak level in db
- From: Brian Willoughby <email@hidden>
- Date: Tue, 15 Oct 2002 06:06:30 -0700
[ I agree with all that - and my scaling by 32767 on the output end
[ is in effect that very small amount of 'backing off'. The issues
[ raised was ensuring an identity operation in converting from and
[ to 16bits, and I can do that despite using 32768 one end and 32767
[ the other.
This is not possible. You cannot preserve identity AND introduce a small
amount of "backing off"
If you're talking about specifically preserving only the 65536 distinct values
that are possible in 16 bit streams (when converted to float), while "backing
off" on all the rest, then I will complain loudly since I have 24 bit A/D and
24 bit D/A audio interfaces where I also want identity. In case you haven't
researched it: 32 bit floats only have 1 bit of precision beyond 24 bit fixed
before quantization noise is introduced, so I don't see any way you can deliver
what's promised.
You're not releasing drivers coded like this, are you?
[ I just find the notion of the purely positive clip inelegant.
Sorry, but this is an inherent limitation of fixed point binary numbers with a
finite bit width. It's not something that started with CoreAudio, so I don't
see why CoreAudio should "correct" it during the float to int conversion. It
only affects those who synthesize waveforms or process audio without clip
detection and/or prevention.
[ All other issues aside, I don't need to code for that clipping at
[ all.
Until the floating point A/D and D/A are invented, you'll have to code for
this! Unless you only want to look at your audio on the screen and not ever
hear it :-)
[ It is in any case a moot point how non-identical samples can be
[ without causing a problem. If symmetry is preserved, the
[ differences would amount to just a minuscule change of level, as
[ you say, which is neither here nor there.
Think of it this way: anything that makes it from the analog world to the
digital world will be symmetrical unless you mess with it, therefore preserving
the bits is all you need to preserve symmetry. The fact that twos complement
numbers are asymmetrical in their capacity by no means forces signals
represented by those numbers to become asymmetrical, unless you create
synthetic signals or process sampled signals without detecting and preventing
clipping.
Brian Willoughby
Sound Consulting
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.