Commit cc9e3ccd authored by Chris Morgan's avatar Chris Morgan Committed by Alexandre Julliard

Fix range in aRts 8bit volume code.

parent 2162eb86
......@@ -211,11 +211,11 @@ void volume_effect8(void *bufin, void* bufout, int length, int left,
for(i = 0; i < length; i+=(nChannels))
{
v = (char) ((*(d_in++) * left) / 100);
*(d_out++) = (v>127) ? 127 : ((v<-128) ? -128 : v);
*(d_out++) = (v>255) ? 255 : ((v<0) ? 0 : v);
if(nChannels == 2)
{
v = (char) ((*(d_in++) * right) / 100);
*(d_out++) = (v>127) ? 127 : ((v<-128) ? -128 : v);
*(d_out++) = (v>255) ? 255 : ((v<0) ? 0 : v);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment