compress.c: fix skips/distortion introduced in r7146

We need to ensure we're working with signed types when assigning
them.

git-svn-id: https://svn.musicpd.org/mpd/trunk@7181 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Eric Wong 2008-02-05 10:17:45 +00:00
parent 6fbdc721d9
commit 77e3283973

View File

@ -354,7 +354,7 @@ void CompressDo(void *data, unsigned int length)
if (!pos)
pos = 1;
gr = ((gainTarget - gainCurrent) << 16)/pos;
gr = ((gainTarget - gainCurrent) << 16)/(int)pos;
/* Do the shiznit */
gf = gainCurrent << 16;