mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-02-18 03:26:57 +01:00
Add .opus variation [Fast RMX (Switch)]
This commit is contained in:
parent
b4f007b6bd
commit
da930bc3c9
@ -673,6 +673,7 @@ VGMSTREAM * init_vgmstream_opus_std(STREAMFILE * streamFile);
|
||||
VGMSTREAM * init_vgmstream_opus_n1(STREAMFILE * streamFile);
|
||||
VGMSTREAM * init_vgmstream_opus_capcom(STREAMFILE * streamFile);
|
||||
VGMSTREAM * init_vgmstream_opus_nop(STREAMFILE * streamFile);
|
||||
VGMSTREAM * init_vgmstream_opus_shinen(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_pc_al2(STREAMFILE * streamFile);
|
||||
|
||||
|
@ -233,3 +233,29 @@ VGMSTREAM * init_vgmstream_opus_nop(STREAMFILE *streamFile) {
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Shin'en variation [Fast RMX (Switch)] */
|
||||
VGMSTREAM * init_vgmstream_opus_shinen(STREAMFILE *streamFile) {
|
||||
off_t offset = 0;
|
||||
int num_samples = 0, loop_start = 0, loop_end = 0;
|
||||
|
||||
/* checks */
|
||||
if ( !check_extensions(streamFile,"opus"))
|
||||
goto fail;
|
||||
|
||||
if (read_32bitBE(0x08,streamFile) != 0x01000080)
|
||||
goto fail;
|
||||
|
||||
offset = 0x08;
|
||||
num_samples = 0;
|
||||
loop_start = read_32bitLE(0x00,streamFile);
|
||||
loop_end = read_32bitLE(0x04,streamFile); /* 0 if no loop */
|
||||
|
||||
if (loop_start > loop_end)
|
||||
goto fail; /* just in case */
|
||||
|
||||
return init_vgmstream_opus(streamFile, meta_OPUS, offset, num_samples,loop_start,loop_end);
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -367,6 +367,7 @@ VGMSTREAM * (*init_vgmstream_functions[])(STREAMFILE *streamFile) = {
|
||||
init_vgmstream_opus_n1,
|
||||
init_vgmstream_opus_capcom,
|
||||
init_vgmstream_opus_nop,
|
||||
init_vgmstream_opus_shinen,
|
||||
init_vgmstream_pc_al2,
|
||||
init_vgmstream_pc_ast,
|
||||
init_vgmstream_naac,
|
||||
|
Loading…
x
Reference in New Issue
Block a user