Fixed two crash bugs

This commit is contained in:
Chris Moeller 2012-12-30 12:38:35 -08:00
parent b4f550037c
commit b54d0be218
2 changed files with 4 additions and 1 deletions

View File

@ -273,6 +273,9 @@ VGMSTREAM * init_vgmstream_ps2_mib(STREAMFILE *streamFile) {
vgmstream->layout_type = layout_none;
vgmstream->interleave_block_size=0;
vgmstream->sample_rate = 22050;
vgmstream->channels = 1;
vgmstream->start_ch = 1;
vgmstream->loop_ch = 1;
}
vgmstream->num_samples = (int32_t)(fileLength/16/channel_count*28);

View File

@ -29,7 +29,7 @@ VGMSTREAM * init_vgmstream_sdt(STREAMFILE *streamFile) {
/* fill in the vital statistics */
start_offset = 0xA0;
vgmstream->channels = read_32bitBE(0x00,streamFile);
vgmstream->channels = channel_count; /*read_32bitBE(0x00,streamFile);*/
vgmstream->sample_rate = read_32bitBE(0x08,streamFile);
vgmstream->coding_type = coding_NGC_DSP;
vgmstream->num_samples = read_32bitBE(0x14,streamFile)/8*14/channel_count;