From 6e0d262a28142e96d9f70bc7618fdcc4b31cd148 Mon Sep 17 00:00:00 2001 From: halleyscometsw Date: Tue, 6 May 2008 04:01:05 +0000 Subject: [PATCH] rwsd uses nibble offsets, not samples git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@90 51a99a44-fe44-0410-b1ba-c3e57ba2b86b --- src/meta/rwsd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/meta/rwsd.c b/src/meta/rwsd.c index 5cecd313..10c4f293 100644 --- a/src/meta/rwsd.c +++ b/src/meta/rwsd.c @@ -1,4 +1,5 @@ #include "meta.h" +#include "../coding/coding.h" #include "../util.h" /* RWSD is quite similar to BRSTM, but can contain several streams. @@ -73,10 +74,10 @@ VGMSTREAM * init_vgmstream_rwsd(const char * const filename) { if (!vgmstream) goto fail; /* fill in the vital statistics */ - vgmstream->num_samples = read_32bitBE(wave_offset+0x1c,infile); + vgmstream->num_samples = dsp_nibbles_to_samples(read_32bitBE(wave_offset+0x1c,infile)); vgmstream->sample_rate = (uint16_t)read_16bitBE(wave_offset+0x14,infile); /* channels and loop flag are set by allocate_vgmstream */ - vgmstream->loop_start_sample = read_32bitBE(wave_offset+0x18,infile); + vgmstream->loop_start_sample = dsp_nibbles_to_samples(read_32bitBE(wave_offset+0x18,infile)); vgmstream->loop_end_sample = vgmstream->num_samples; vgmstream->coding_type = coding_type;