From 997b2fdd4ead6142b2dc78b8f506dee0cd7d71ae Mon Sep 17 00:00:00 2001 From: manakoAT Date: Thu, 4 Dec 2008 20:58:27 +0000 Subject: [PATCH] .vs fixed git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@499 51a99a44-fe44-0410-b1ba-c3e57ba2b86b --- src/meta/vs.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/meta/vs.c b/src/meta/vs.c index aaf2d19e..26495c4f 100644 --- a/src/meta/vs.c +++ b/src/meta/vs.c @@ -33,33 +33,32 @@ VGMSTREAM * init_vgmstream_vs(STREAMFILE *streamFile) { vgmstream->interleave_block_size=0x10; vgmstream->sample_rate = read_32bitLE(0x04,streamFile); vgmstream->coding_type = coding_PSX; - /* vgmstream->num_samples = (get_streamfile_size(streamFile)-start_offset); */ - + +#if 0 if (loop_flag) { vgmstream->loop_start_sample = 0; vgmstream->loop_end_sample = (read_32bitLE(0x0c,streamFile)-start_offset); } - - +#endif + vgmstream->layout_type = layout_vs_blocked; vgmstream->meta_type = meta_VS; - /* open the file for reading */ - { + + /* open the file for reading */ + { for (i=0;ich[i].streamfile = streamFile->open(streamFile,filename,0x2000); if (!vgmstream->ch[i].streamfile) goto fail; } } - /* STREAMFILE_DEFAULT_BUFFER_SIZE */ - /* Calc num_samples */ vs_block_update(start_offset,vgmstream); vgmstream->num_samples=0; do { - vgmstream->num_samples += vgmstream->current_block_size*28/16/channel_count; + vgmstream->num_samples += vgmstream->current_block_size*28/16; vs_block_update(vgmstream->next_block_offset,vgmstream); } while (vgmstream->next_block_offset