From 42c73ff3639a97bc09fbe68980848067096ea1b8 Mon Sep 17 00:00:00 2001 From: fastelbja Date: Sat, 17 May 2008 17:32:02 +0000 Subject: [PATCH] fix RAW support git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@149 51a99a44-fe44-0410-b1ba-c3e57ba2b86b --- src/meta/raw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/meta/raw.c b/src/meta/raw.c index 4c50c4b6..66d7581b 100644 --- a/src/meta/raw.c +++ b/src/meta/raw.c @@ -31,7 +31,7 @@ VGMSTREAM * init_vgmstream_raw(const char * const filename) { vgmstream->channels = 2; vgmstream->sample_rate = 44100; vgmstream->coding_type = coding_PCM16LE; - vgmstream->num_samples = (int32_t)(get_streamfile_size(infile)/2); + vgmstream->num_samples = (int32_t)(get_streamfile_size(infile)/4); vgmstream->layout_type = layout_interleave; vgmstream->interleave_block_size = 2; vgmstream->meta_type = meta_RAW; @@ -46,7 +46,7 @@ VGMSTREAM * init_vgmstream_raw(const char * const filename) { if (!vgmstream->ch[i].streamfile) goto fail; vgmstream->ch[i].channel_start_offset= - vgmstream->ch[i].offset=0; + vgmstream->ch[i].offset=(off_t)(i*vgmstream->interleave_block_size); } }