Merge pull request #215 from bxaimc/master

Add CVS support and RRP XA2 fixes
This commit is contained in:
Christopher Snowhill 2018-04-20 17:56:25 -07:00 committed by GitHub
commit f320a2e27c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View File

@ -92,6 +92,7 @@ static const char* extension_list[] = {
"ckd",
"cnk",
"cps",
"cvs",
"cxs",
"da",

View File

@ -74,7 +74,8 @@ VGMSTREAM * init_vgmstream_ps2_mib(STREAMFILE *streamFile) {
/* check extension, case insensitive */
streamFile->get_name(streamFile,filename,sizeof(filename));
if (strcasecmp("mib",filename_extension(filename)) &&
if (strcasecmp("cvs",filename_extension(filename)) &&
strcasecmp("mib",filename_extension(filename)) &&
strcasecmp("mi4",filename_extension(filename)) &&
strcasecmp("vb",filename_extension(filename)) &&
strcasecmp("xag",filename_extension(filename))) goto fail;
@ -268,7 +269,8 @@ VGMSTREAM * init_vgmstream_ps2_mib(STREAMFILE *streamFile) {
vgmstream->sample_rate = 44100;
}
if(!strcasecmp("vb",filename_extension(filename)))
if (!strcasecmp("cvs", filename_extension(filename)) ||
!strcasecmp("vb",filename_extension(filename)))
{
vgmstream->layout_type = layout_none;
vgmstream->interleave_block_size=0;

View File

@ -15,7 +15,7 @@ VGMSTREAM * init_vgmstream_ps2_xa2_rrp(STREAMFILE *streamFile) {
if (strcasecmp("xa2",filename_extension(filename))) goto fail;
/* check header */
if (read_32bitBE(0xC,streamFile) != 0x00000000)
if (read_32bitBE(0x50,streamFile) != 0x00000000)
goto fail;
loop_flag = 0;
@ -32,6 +32,9 @@ VGMSTREAM * init_vgmstream_ps2_xa2_rrp(STREAMFILE *streamFile) {
vgmstream->coding_type = coding_PSX;
vgmstream->num_samples = (get_streamfile_size(streamFile)-0x800)*28/16/channel_count;
vgmstream->layout_type = layout_interleave;
if (channel_count > 2)
vgmstream->interleave_block_size = 0x400;
else
vgmstream->interleave_block_size = 0x1000;
vgmstream->meta_type = meta_PS2_XA2_RRP;