From 800ebfc007547b781fd02edfd2babaa6ea50e7ef Mon Sep 17 00:00:00 2001 From: bnnm Date: Thu, 6 Sep 2018 18:10:47 +0200 Subject: [PATCH] Minor doc --- src/coding/ima_decoder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coding/ima_decoder.c b/src/coding/ima_decoder.c index 9da012cb..70d73660 100644 --- a/src/coding/ima_decoder.c +++ b/src/coding/ima_decoder.c @@ -147,7 +147,7 @@ static void snds_ima_expand_nibble(VGMSTREAMCHANNEL * stream, off_t byte_offset, *hist1 = clamp16(sample_decoded); } -/* Omikron: The Nomad Soul, algorithm by aluigi */ +/* Omikron: The Nomad Soul, algorithm from the .exe */ static void otns_ima_expand_nibble(VGMSTREAMCHANNEL * stream, off_t byte_offset, int nibble_shift, int32_t * hist1, int32_t * step_index) { int sample_nibble, sample_decoded, step, delta; @@ -156,8 +156,8 @@ static void otns_ima_expand_nibble(VGMSTREAMCHANNEL * stream, off_t byte_offset, step = ADPCMTable[*step_index]; delta = 0; - if(sample_nibble & 4) delta = step << 2; - if(sample_nibble & 2) delta += step << 1; + if(sample_nibble & 4) delta = step * 4; + if(sample_nibble & 2) delta += step * 2; if(sample_nibble & 1) delta += step; delta >>= 2; if (sample_nibble & 8) delta = -delta;