Re: Stereo > Mono Downmixing on iOS
Re: Stereo > Mono Downmixing on iOS
- Subject: Re: Stereo > Mono Downmixing on iOS
- From: Bob Lang <email@hidden>
- Date: Thu, 31 Mar 2011 23:02:06 +0100
Hi
On 31 Mar 2011, at 12:18, Paul Davis wrote:
> no, using floating point is far more common in a software context.
> this essentially cannot overflow, though there is some (small) loss of
> precision when the summed signal exceeds the range of a signed 24 bit
> int.
What you've written here implies that using floats solves the problem of data overflow whereas using ints doesn't. That is incorrect.
Sure, if you store 16 bit audio samples in short integers and start adding them together then you can expect problems when data overflows! If you store audio samples in floats then the operating system won't complain about overflows, but the same is true if you store your data in 32 bit integers with sign extension for negative values - and you can expect intermediate processing to be faster using ints.
Whichever type you use, the problem of overflow doesn't go away. Floats are normalised to the range -0.9999... to +0.9999... so if you add two values and get a sum >= 1.0 then you've got exactly the same problem as when the sum of two signed 16 bit samples exceeds 32767. In either case, you've got an invalid audio sample and you have to decide what to do with it to make it valid again.
Bob
_______________________________________________
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