Index: riff.c =================================================================== --- riff.c (revision 968) +++ riff.c (working copy) @@ -175,6 +175,13 @@ goto fail; } break; + case 2: /* MS ADPCM */ + /* ensure 4bps */ + if (read_16bitLE(current_chunk+0x16,streamFile)!=4) + goto fail; + coding_type = coding_MSADPCM; + interleave = 0; + break; case 0x11: /* MS IMA ADCM */ /* ensure 4bps */ if (read_16bitLE(current_chunk+0x16,streamFile)!=4) @@ -279,6 +286,7 @@ case coding_L5_555: sample_count = data_size/0x12/channel_count*32; break; + case coding_MSADPCM: case coding_MS_IMA: sample_count = (data_size / block_size) * (block_size - 4 * channel_count) * 2 / channel_count + ((data_size % block_size) ? (data_size % block_size - 4 * channel_count) * 2 / channel_count : 0); @@ -302,13 +310,13 @@ vgmstream->sample_rate = sample_rate; vgmstream->coding_type = coding_type; - if (channel_count > 1 && coding_type != coding_PCM8_U_int && coding_type != coding_MS_IMA) + if (channel_count > 1 && coding_type != coding_PCM8_U_int && coding_type != coding_MS_IMA && coding_type != coding_MSADPCM) vgmstream->layout_type = layout_interleave; else vgmstream->layout_type = layout_none; vgmstream->interleave_block_size = interleave; - if (coding_type == coding_MS_IMA) + if (coding_type == coding_MS_IMA || coding_type == coding_MSADPCM) vgmstream->interleave_block_size = block_size; if (loop_flag) {