Browse Source

Updated VGMStream to r1050-2349-g5fe83c0c

master
parent
commit
ff35f6c3cf
3 changed files with 30 additions and 0 deletions
  1. +2
    -0
      Frameworks/vgmstream/vgmstream/src/meta/meta.h
  2. +27
    -0
      Frameworks/vgmstream/vgmstream/src/meta/opus.c
  3. +1
    -0
      Frameworks/vgmstream/vgmstream/src/vgmstream.c

+ 2
- 0
Frameworks/vgmstream/vgmstream/src/meta/meta.h View File

@@ -856,4 +856,6 @@ VGMSTREAM * init_vgmstream_fsb5_fev_bank(STREAMFILE * streamFile);

VGMSTREAM * init_vgmstream_bwav(STREAMFILE * streamFile);

VGMSTREAM * init_vgmstream_opus_prototype(STREAMFILE * streamFile);

#endif /*_META_H*/

+ 27
- 0
Frameworks/vgmstream/vgmstream/src/meta/opus.c View File

@@ -341,3 +341,30 @@ VGMSTREAM * init_vgmstream_opus_opusx(STREAMFILE *streamFile) {
fail:
return NULL;
}
/* Prototype variation [Clannad (Switch)] */
VGMSTREAM * init_vgmstream_opus_prototype(STREAMFILE *streamFile) {
off_t offset = 0;
int num_samples = 0, loop_start = 0, loop_end = 0, loop_flag;
/* checks */
if (!check_extensions(streamFile, "opus,lopus"))
goto fail;
if (read_32bitBE(0x00, streamFile) != 0x4F505553 || /* "OPUS" */
read_32bitBE(0x18, streamFile) != 0x01000080)
goto fail;
offset = 0x18;
num_samples = read_32bitLE(0x08, streamFile);
/* Check if there's a loop end value to determine loop_flag*/
loop_flag = read_32bitLE(0x10, streamFile);
if (loop_flag) {
loop_start = read_32bitLE(0x0C, streamFile);
loop_end = read_32bitLE(0x10, streamFile);
}
return init_vgmstream_opus(streamFile, meta_OPUS, offset, num_samples, loop_start, loop_end);
fail:
return NULL;
}

+ 1
- 0
Frameworks/vgmstream/vgmstream/src/vgmstream.c View File

@@ -481,6 +481,7 @@ VGMSTREAM * (*init_vgmstream_functions[])(STREAMFILE *streamFile) = {
init_vgmstream_9tav,
init_vgmstream_fsb5_fev_bank,
init_vgmstream_bwav,
init_vgmstream_opus_prototype,

/* lowest priority metas (should go after all metas, and TXTH should go before raw formats) */
init_vgmstream_txth, /* proper parsers should supersede TXTH, once added */


Loading…
Cancel
Save