Commit Graph

11 Commits

Author SHA1 Message Date
Andrew Gunnerson
1f2132ac3f
meta/brstm.c: Parse ADPCM header offset for each channel instead of skipping a fixed distance
The parser previously computed the offset of the coefficients field of
channel 0's ADPCM header and then skipped 0x38 bytes to get to the
coefficients field of the next channel's ADPCM header. This breaks for
some files because they have larger 0x3a byte ACPCM headers.

This commit updates the logic to compute the offset of each channel's
ADPCM header. Immediately after the HEAD part 3 header, there's an
8-byte table for each channel, where the second field indicates the
offset of that channel's ADPCM header. With this information, it's just
a matter of adding 0x08 to get the coefficients field.

Fixes: #674

Signed-off-by: Andrew Gunnerson <chillermillerlong@hotmail.com>
2020-07-24 21:36:04 -04:00
bnnm
eca9b83208 Simplify last block interleave
Remove layout_interleave_shortblock for clarity as the value is enough
to signal its use. Also fix .snd last block calculation, and clean some
metas since I was testing changes anyway.
2018-03-24 19:27:24 +01:00
Chris Moeller
142cfc971d Raised path length limit to 32767 characters, controlled by a global enum definition 2013-05-26 20:55:50 -07:00
halleyscometsw
7f93db8d84 support odd brstm from Trauma Center: Second Opinion, blame Atlus
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@547 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
2009-01-01 03:24:57 +00:00
paladine
3ae797a88a Changed STREAMFILE to be an abstract structure with function pointers for file operations. These changes have been done to support the audacious plugin which will use audacious-VFS I/O instead of stdio. The winamp plugin uses stdio, and has been tested and is working.
stdio optimizations include the prevention of 'doubly opening' a file.  If a file is opened that is already opened, the file handle is duplicated instead of using the normal fopen call.  

git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@180 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
2008-05-20 15:18:38 +00:00
halleyscometsw
37f70ab663 brstmspm hack for Super Paper Mario
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@140 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
2008-05-16 23:14:47 +00:00
halleyscometsw
2a686eeea2 consolidate headers
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@89 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
2008-05-06 03:35:37 +00:00
halleyscometsw
4a72051cf5 support for > 2 channel brstm
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@73 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
2008-04-15 15:50:17 +00:00
halleyscometsw
8896b396a7 a few 16-bit reads should have been unsigned
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@47 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
2008-03-11 05:17:57 +00:00
halleyscometsw
2d3376e473 NDS STRM format support (only decoding PCM for now)
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@20 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
2008-02-05 07:38:00 +00:00
halleyscometsw
7472c2e4f9 moving some more stuff around
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@16 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
2008-02-05 01:52:42 +00:00