From 0be920be2d1875c2ce9fef1a3a8431d3abb7b928 Mon Sep 17 00:00:00 2001 From: halleyscometsw Date: Sun, 17 Aug 2008 23:07:41 +0000 Subject: [PATCH] MS ADPCM for genh git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@410 51a99a44-fe44-0410-b1ba-c3e57ba2b86b --- readme.txt | 2 +- src/meta/genh.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index bfa41adb..31c516d9 100644 --- a/readme.txt +++ b/readme.txt @@ -89,7 +89,7 @@ File types supported by this version of vgmstream: - .sng, .asf, .str, .eam (EA/XA ADPCM or PSX ADPCM) - .cfn (GC DSP ADPCM) - .vpk (PSX ADPCM) -- .genh (PSX ADPCM, IMA ADPCM, GC DTK ADPCM, 8/16 bit PCM, SDX2, MPEG, AICA ADPCM) +- .genh (PSX ADPCM, IMA ADPCM, GC DTK ADPCM, 8/16 bit PCM, SDX2, MPEG, AICA ADPCM, MS ADPCM) - .ogg, .logg (Ogg Vorbis) - .sad (GC DSP ADPCM) - .bmdx (PSX ADPCM) diff --git a/src/meta/genh.c b/src/meta/genh.c index 75587e64..27c80ddf 100644 --- a/src/meta/genh.c +++ b/src/meta/genh.c @@ -48,6 +48,7 @@ VGMSTREAM * init_vgmstream_genh(STREAMFILE *streamFile) { /* 8 = MPEG-1 Layer III, possibly also the MPEG-2 and 2.5 extensions */ /* 9 = IMA */ /* 10 = AICA ADPCM */ + /* 11 = MS ADPCM */ /* ... others to come */ switch (read_32bitLE(0x18,streamFile)) { case 0: @@ -87,6 +88,9 @@ VGMSTREAM * init_vgmstream_genh(STREAMFILE *streamFile) { case 10: coding = coding_AICA; break; + case 11: + coding = coding_MSADPCM; + break; default: goto fail; } @@ -133,6 +137,7 @@ VGMSTREAM * init_vgmstream_genh(STREAMFILE *streamFile) { case coding_DVI_IMA: case coding_IMA: case coding_AICA: + case coding_MSADPCM: vgmstream->interleave_block_size = interleave; if (channel_count > 1) { @@ -197,6 +202,7 @@ VGMSTREAM * init_vgmstream_genh(STREAMFILE *streamFile) { } break; case coding_XBOX: + case coding_MSADPCM: /* xbox's "interleave" is a lie, all channels start at same * offset */ chstreamfile =