mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-19 00:04:04 +01:00
Nop format support
This commit is contained in:
parent
ff637b9507
commit
8711f5325e
@ -206,6 +206,7 @@ static const char* extension_list[] = {
|
|||||||
"naac",
|
"naac",
|
||||||
"ndp",
|
"ndp",
|
||||||
"ngca",
|
"ngca",
|
||||||
|
"nop",
|
||||||
"nps",
|
"nps",
|
||||||
"npsf", //fake extension/header id for .nps (to be removed)
|
"npsf", //fake extension/header id for .nps (to be removed)
|
||||||
"nus3bank",
|
"nus3bank",
|
||||||
|
@ -11,7 +11,7 @@ VGMSTREAM * init_vgmstream_nsw_opus(STREAMFILE *streamFile) {
|
|||||||
off_t offset = 0;
|
off_t offset = 0;
|
||||||
|
|
||||||
/* check extension, case insensitive */
|
/* check extension, case insensitive */
|
||||||
if ( !check_extensions(streamFile,"opus,lopus")) /* no relation to Ogg Opus */
|
if ( !check_extensions(streamFile,"opus,lopus,nop")) /* no relation to Ogg Opus */
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
/* variations, maybe custom */
|
/* variations, maybe custom */
|
||||||
@ -32,6 +32,16 @@ VGMSTREAM * init_vgmstream_nsw_opus(STREAMFILE *streamFile) {
|
|||||||
loop_start = read_32bitLE(0x08,streamFile);
|
loop_start = read_32bitLE(0x08,streamFile);
|
||||||
loop_end = read_32bitLE(0x0c,streamFile);
|
loop_end = read_32bitLE(0x0c,streamFile);
|
||||||
}
|
}
|
||||||
|
else if (read_32bitBE(0x00, streamFile) == 0x73616466 && read_32bitBE(0x08, streamFile) == 0x6f707573) { /* Xenoblade Chronicles 2 */
|
||||||
|
offset = read_32bitLE(0x1c, streamFile);
|
||||||
|
|
||||||
|
num_samples = read_32bitLE(0x28, streamFile);
|
||||||
|
loop_flag = read_8bit(0x19, streamFile);
|
||||||
|
if (loop_flag) {
|
||||||
|
loop_start = read_32bitLE(0x2c, streamFile);
|
||||||
|
loop_end = read_32bitLE(0x30, streamFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
offset = 0x00;
|
offset = 0x00;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user