Re: Canonical format max amp limits?
Re: Canonical format max amp limits?
- Subject: Re: Canonical format max amp limits?
- From: Steve Checkoway <email@hidden>
- Date: Wed, 14 Jul 2004 16:42:48 -0700
On Jul 14, 2004, at 4:11 PM, James Chandler Jr wrote:
Two things (apologies for belaboring the point)--
Hey, if that's what it takes to get through to me...
* Though the distortion might be small, assymetrical scaling just
"isn't the
right thing to do".
By asymmetrical do you mean the scaling depending on the negative or
positive value or using one conversion from int to float and another
from float to int?
* If you do any non-trivial DSP float processing, its guaranteed that
there will
be conditions making the float values occasionally go WAY LOUDER than
{-1.0,
+1.0}.
Actually, in my case, I am doing fairly trivial DSP. I get my data as
16 bit signed integer since that is what both the windows code and the
linux code expect. Using the ancient Sound Manager, I could just pass
that data right through to the sound card since at least mine and every
other one that I've encountered supports 16 bit int at the very least.
Using CoreAudio, I have to convert it to float. Of course, CoreAudio
must eventually convert this back to int to send to the card (or
whatever you call it when it's builtin, device I suppose). This step
seems unnecessary but I cannot set the input procedure format to the
one I want so I am forced to convert it before passing it along.
To ensure 'as proper as possible' operation, in cases where the user
mis-adjusts
one of your program's knobs, you always have to clip to avoid
wraparound.
Wraparound sounds way worse than hard-clipping.
This really isn't an issue in my case. The value of the int just can't
go above it's max.
Since clipping might as well be considered mandatory, the 'incorrect'
assymetrical scaling strategy wouldn't even offer efficiency
advantages.
If one was simply dividing by 32768 (or multiplying by 1/32768) then
does this problem exist?
Lastly, I apologize for hijacking this thread. I thought I had
something to contribute, it turns out I didn't quite know as much as I
thought. Ah well. I hope that others have found this as informative as
I.
- Steve
_______________________________________________
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.