# HG changeset patch # User arpi # Date 1025388618 0 # Node ID 7745d73a5f205d17376ad5946045f47e01c8f27f # Parent da27a1bc17635df7328eb23d2541b32eb09db84a bugfix by Keiki SATOH diff -r da27a1bc1763 -r 7745d73a5f20 libmpcodecs/ad_msadpcm.c --- a/libmpcodecs/ad_msadpcm.c Sat Jun 29 21:43:28 2002 +0000 +++ b/libmpcodecs/ad_msadpcm.c Sat Jun 29 22:10:18 2002 +0000 @@ -43,7 +43,7 @@ 0, -256, 0, 64, 0, -208, -232 }; -#define MS_ADPCM_PREAMBLE_SIZE 7 +#define MS_ADPCM_PREAMBLE_SIZE 6 #define LE_16(x) (le2me_16(*(unsigned short *)(x))) #define LE_32(x) (le2me_32(*(unsigned int *)(x))) @@ -159,6 +159,17 @@ SE_16BIT(sample2[1]); } + if (channels == 1) + { + output[out_ptr++] = sample2[0]; + output[out_ptr++] = sample1[0]; + } else { + output[out_ptr++] = sample2[0]; + output[out_ptr++] = sample2[1]; + output[out_ptr++] = sample1[0]; + output[out_ptr++] = sample1[1]; + } + while (stream_ptr < block_size) { // get the next nibble