mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-13 18:20:50 +01:00
Fix some Ubi LyN [Michael Jackson the Experience (PS3)]
This commit is contained in:
parent
93838471df
commit
9af7eadbcb
@ -147,7 +147,8 @@ mpeg_codec_data *init_mpeg_custom(STREAMFILE *streamFile, off_t start_offset, co
|
||||
|
||||
if (channels <= 0 || channels > 16) goto fail; /* arbitrary max */
|
||||
if (channels < data->channels_per_frame) goto fail;
|
||||
if (data->default_buffer_size > 0x8000) goto fail;
|
||||
//todo simplify/unify XVAG/P3D/SCD/LYN and just feed arbitrary chunks to the decoder
|
||||
if (data->default_buffer_size > 0x10000) goto fail; /* max for some Ubi Lyn */
|
||||
|
||||
|
||||
/* init streams */
|
||||
|
@ -159,12 +159,9 @@ VGMSTREAM * init_vgmstream_ubi_lyn(STREAMFILE *streamFile) {
|
||||
mpeg_custom_config cfg = {0};
|
||||
int i;
|
||||
|
||||
if (read_32bitLE(start_offset+0x00,streamFile) != 2) /* id? */
|
||||
goto fail;
|
||||
|
||||
cfg.interleave = read_32bitLE(start_offset+0x04,streamFile);
|
||||
cfg.chunk_size = read_32bitLE(start_offset+0x08,streamFile);
|
||||
/* 0x08: frame size, 0x0c: frame per interleave, 0x10: samples per frame */
|
||||
cfg.chunk_size = read_32bitLE(start_offset+0x08,streamFile); /* frame size (not counting MPEG padding?) */
|
||||
/* 0x00: id? (2=Tintin, 3=Michael Jackson), 0x0c: frame per interleave, 0x10: samples per frame */
|
||||
|
||||
/* skip seek tables and find actual start */
|
||||
start_offset += 0x14;
|
||||
|
Loading…
Reference in New Issue
Block a user