From 77e3283973c0703a16448889c176d81695c73cc7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 5 Feb 2008 10:17:45 +0000 Subject: 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 --- src/compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compress.c') diff --git a/src/compress.c b/src/compress.c index 2f7719356..3d8b913b4 100644 --- a/src/compress.c +++ b/src/compress.c @@ -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; -- cgit v1.2.3