Add KTSS .ATSL [Sengoku Musou Sanada Maru (Switch)]

This commit is contained in:
bnnm 2018-03-31 13:06:00 +02:00
parent eda2a4ac34
commit 0e64480cd0

View File

@ -2,7 +2,7 @@
#include "../coding/coding.h" #include "../coding/coding.h"
static STREAMFILE* setup_atsl_streamfile(STREAMFILE *streamFile, off_t subfile_offset, size_t subfile_size, const char* fake_ext); static STREAMFILE* setup_atsl_streamfile(STREAMFILE *streamFile, off_t subfile_offset, size_t subfile_size, const char* fake_ext);
typedef enum { ATRAC3, ATRAC9, KOVS } atsl_codec; typedef enum { ATRAC3, ATRAC9, KOVS, KTSS } atsl_codec;
/* .ATSL - Koei Tecmo audio container [One Piece Pirate Warriors (PS3), Warriors All-Stars (PC)] */ /* .ATSL - Koei Tecmo audio container [One Piece Pirate Warriors (PS3), Warriors All-Stars (PC)] */
VGMSTREAM * init_vgmstream_atsl(STREAMFILE *streamFile) { VGMSTREAM * init_vgmstream_atsl(STREAMFILE *streamFile) {
@ -39,6 +39,7 @@ VGMSTREAM * init_vgmstream_atsl(STREAMFILE *streamFile) {
* - 00060301 00040301 atsl in G1L from One Piece Pirate Warriors 3 (Vita)[ATRAC9] * - 00060301 00040301 atsl in G1L from One Piece Pirate Warriors 3 (Vita)[ATRAC9]
* - 00060301 00010301 atsl in G1L from One Piece Pirate Warriors 3 (PC)[KOVS] * - 00060301 00010301 atsl in G1L from One Piece Pirate Warriors 3 (PC)[KOVS]
* - 000A0301 00010501 atsl in G1L from Warriors All-Stars (PC)[KOVS] * - 000A0301 00010501 atsl in G1L from Warriors All-Stars (PC)[KOVS]
* - 000B0301 00080601 atsl in G1l from Sengoku Musou Sanada Maru (Switch)[KTSS]
*/ */
type = read_8bit(0x0d, streamFile); type = read_8bit(0x0d, streamFile);
switch(type) { switch(type) {
@ -56,7 +57,12 @@ VGMSTREAM * init_vgmstream_atsl(STREAMFILE *streamFile) {
codec = ATRAC9; codec = ATRAC9;
fake_ext = "at9"; fake_ext = "at9";
break; break;
case 0x08:
codec = KTSS;
fake_ext = "ktss";
break;
default: default:
VGM_LOG("ATSL: unknown type %x\n", type);
goto fail; goto fail;
} }
read_32bit = big_endian ? read_32bitBE : read_32bitLE; read_32bit = big_endian ? read_32bitBE : read_32bitLE;
@ -118,6 +124,10 @@ VGMSTREAM * init_vgmstream_atsl(STREAMFILE *streamFile) {
vgmstream = init_vgmstream_ogg_vorbis(temp_streamFile); vgmstream = init_vgmstream_ogg_vorbis(temp_streamFile);
if (!vgmstream) goto fail; if (!vgmstream) goto fail;
break; break;
case KTSS:
vgmstream = init_vgmstream_ktss(temp_streamFile);
if (!vgmstream) goto fail;
break;
default: default:
goto fail; goto fail;
} }