mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-24 15:00:11 +01:00
Fixed two crash bugs
This commit is contained in:
parent
b4f550037c
commit
b54d0be218
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user