fix .VS format

git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@498 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
fastelbja 2008-12-04 20:37:59 +00:00
parent f303c080ac
commit 9be1f1806b
2 changed files with 7 additions and 8 deletions

View File

@ -5,14 +5,13 @@
void vs_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
int i;
vgmstream->current_block_offset = block_offset;
vgmstream->current_block_size = read_32bitLE(
vgmstream->current_block_offset,
vgmstream->ch[0].streamfile);
vgmstream->next_block_offset = vgmstream->current_block_offset + vgmstream->current_block_size + 0x4;
vgmstream->current_block_size/=vgmstream->channels;
for (i=0;i<vgmstream->channels;i++) {
vgmstream->current_block_offset = block_offset;
vgmstream->current_block_size = read_32bitLE(
vgmstream->current_block_offset,
vgmstream->ch[0].streamfile);
vgmstream->next_block_offset = vgmstream->current_block_offset + vgmstream->current_block_size + 0x4;
vgmstream->ch[i].offset = vgmstream->current_block_offset + 0x4;
if(i==0) block_offset=vgmstream->next_block_offset;
}
}

View File

@ -30,6 +30,7 @@ VGMSTREAM * init_vgmstream_vs(STREAMFILE *streamFile) {
/* fill in the vital statistics */
start_offset = 0x08;
vgmstream->channels = channel_count;
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); */
@ -41,7 +42,6 @@ VGMSTREAM * init_vgmstream_vs(STREAMFILE *streamFile) {
vgmstream->layout_type = layout_vs_blocked;
vgmstream->interleave_block_size = 0x2000;
vgmstream->meta_type = meta_VS;
/* open the file for reading */