Fix downmix_int_8bit() in libxmp-lite assuming char is a signed type

git-svn-id: https://svn.eduke32.com/eduke32@7082 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-10-25 23:29:13 +00:00
parent 688fadd729
commit 9e68009725

View file

@ -158,7 +158,7 @@ static mixer_set a500led_mixers = {
/* Downmix 32bit samples to 8bit, signed or unsigned, mono or stereo output */
static void downmix_int_8bit(char *dest, int32 *src, int num, int amp, int offs)
static void downmix_int_8bit(int8 *dest, int32 *src, int num, int amp, int offs)
{
int smp;
int shift = DOWNMIX_SHIFT + 8 - amp;
@ -580,7 +580,7 @@ void libxmp_mixer_softmixer(struct context_data *ctx)
}
if (s->format & XMP_FORMAT_8BIT) {
downmix_int_8bit(s->buffer, s->buf32, size, s->amplify,
downmix_int_8bit((int8 *)s->buffer, s->buf32, size, s->amplify,
s->format & XMP_FORMAT_UNSIGNED ? 0x80 : 0);
} else {
downmix_int_16bit((int16 *)s->buffer, s->buf32, size,s->amplify,