From: Ulrich K. <uk...@us...> - 2013-02-17 16:59:40
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "sox". The branch, master has been updated via 97bea98f87382d6abf885bd2e671dee845cad43b (commit) from 9f65df887ce6d6b3c8b5d6595f596e4a3eac61b5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 97bea98f87382d6abf885bd2e671dee845cad43b Author: Guido Aulisi <gui...@gm...> Date: Mon Nov 26 15:38:07 2012 +0100 mcompand: fix bad clipping due to overflow of band summing. When summing bands in mcompand I got some bad unnoticed clipping, and the samples wrapped from positive to negative and viceversa. With many bands sox_sample_t intergers get wrapped before being cast to double. diff --git a/ChangeLog b/ChangeLog index e7f7316..a984706 100644 --- a/ChangeLog +++ b/ChangeLog @@ -38,6 +38,7 @@ Effects: o Improved pink noise frequency response in synth. (robs) o Extended syntax for specifying audio positions to several effects. (Ulrich Klauer) + o Fix integer overflow in mcompand. [3590093] (Guido Aulisi) Other new features: diff --git a/src/mcompand.c b/src/mcompand.c index e03f072..5682c5e 100644 --- a/src/mcompand.c +++ b/src/mcompand.c @@ -395,7 +395,7 @@ static int flow(sox_effect_t * effp, const sox_sample_t *ibuf, sox_sample_t *obu (void)sox_mcompand_flow_1(effp, c,l,bbuf,abuf,len, (size_t)effp->out_signal.channels); for (i=0;i<len;++i) { - out = obuf[i] + abuf[i]; + out = (double)obuf[i] + (double)abuf[i]; SOX_SAMPLE_CLIP_COUNT(out, effp->clips); obuf[i] = out; } ----------------------------------------------------------------------- Summary of changes: ChangeLog | 1 + src/mcompand.c | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) hooks/post-receive -- sox |