Mercurial > audlegacy
changeset 1094:0c43b993fc95 trunk
[svn] - if we're going to clip, just throw back the original data
author | nenolod |
---|---|
date | Sun, 21 May 2006 12:13:55 -0700 |
parents | cb5780140f43 |
children | dec5caa8768b |
files | Plugins/Input/mpg123/psycho.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugins/Input/mpg123/psycho.c Sat May 20 22:25:31 2006 -0700 +++ b/Plugins/Input/mpg123/psycho.c Sun May 21 12:13:55 2006 -0700 @@ -439,10 +439,18 @@ lprev2 = left2; rprev2 = right2; +#if 0 if (left < -32768) left = -32768; else if (left > 32767) left = 32767; if (right < -32768) right = -32768; else if (right > 32767) right = 32767; +#endif + /* if we're going to clip, just throw back the original data */ + if (left < -32768 || left > 32767 || right < -32768 || right > 32767) + { + dataptr += 2; + continue; + } dataptr[0] = left; dataptr[1] = right;