mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-02-22 21:30:33 +01:00
Tweak sadf extensions and check
This commit is contained in:
parent
eeba83c093
commit
142ec05269
@ -1,4 +1,5 @@
|
|||||||
#include "meta.h"
|
#include "meta.h"
|
||||||
|
#include "../coding/coding.h"
|
||||||
|
|
||||||
/* sadf - from Procyon Studio audio driver games [Xenoblade Chronicles 2 (Switch)] (sfx) */
|
/* sadf - from Procyon Studio audio driver games [Xenoblade Chronicles 2 (Switch)] (sfx) */
|
||||||
VGMSTREAM* init_vgmstream_sadf(STREAMFILE* sf) {
|
VGMSTREAM* init_vgmstream_sadf(STREAMFILE* sf) {
|
||||||
@ -8,11 +9,16 @@ VGMSTREAM* init_vgmstream_sadf(STREAMFILE* sf) {
|
|||||||
|
|
||||||
|
|
||||||
/* checks */
|
/* checks */
|
||||||
if (!check_extensions(sf, "sad"))
|
/* .sad: assumed (from older sadX formats)
|
||||||
|
* .nop: assumed (from streamed files)
|
||||||
|
* (extensionless): name in .xsp bigfiles */
|
||||||
|
if (!check_extensions(sf, "sad,nop,"))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (read_32bitBE(0x00, sf) != 0x73616466) /* "sadf" */
|
if (read_32bitBE(0x00, sf) != 0x73616466) /* "sadf" */
|
||||||
goto fail;
|
goto fail;
|
||||||
|
if (read_32bitBE(0x08, sf) != 0x6470636D) /* "dpcm" ("opus" is used too, see opus.c, "ipcm" supposedly too) */
|
||||||
|
goto fail;
|
||||||
|
|
||||||
channel_count = read_8bit(0x18, sf);
|
channel_count = read_8bit(0x18, sf);
|
||||||
loop_flag = read_8bit(0x19, sf);
|
loop_flag = read_8bit(0x19, sf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user