From: Doug C. <idi...@us...> - 2009-10-09 21:55:03
|
> > Manual volume adjustment should no longer be needed; e.g. try something > like this: > On a somewhat related note, and thinking far into the future, what would be the pros/cons of using float instead of int32 as the SoX sample type (other than the work involved)? It seems like it would avoid a number of complications. If all effects were to use floats, then clipping would only be a factor in the encoder, and guard/headroom would become unnecessary (they can become aliases for normalize since you would just need a normalization pass right before encode). If we need binary compatibility with previously-compiled format/effects libraries, I suppose this could be done as a flag indicating "I work with floats instead of ints", and letting the flow engine transform the buffers as needed. This would also allow effects to be converted one at a time. Performance could potentially be affected, but this depends greatly on the hardware. What processors are commonly used for SoX? For modern i386, using float would probably not negatively affect performance of most operations, especially if targeting SSE-enabled chips. On the other hand, many ARM platforms don't have an FPU, and floating point is somewhat slower. This would in some cases be offset by the reduced headroom/guard processing and clip detection. Precision is now limited to a 24 bit mantissa instead of 31, but that's 24 bits regardless of magnitude as opposed to variable bits depending on the sample's magnitude. And 24 bits ought to be enough for anyone, right? Anyway, just thinking. Nothing serious (yet) :). |