Add .sng extension for EA 1SNh as foobar doesn't like .asf

This commit is contained in:
bnnm 2018-03-30 00:39:21 +02:00
parent 011b880884
commit ac3aa26420
2 changed files with 5 additions and 4 deletions

View File

@ -122,11 +122,12 @@ like foobar or Winamp don't react well to that, they may be renamed for
vgmstream (mainly to get looping in some cases).
- .ac3 to .lac3
- .aac to .laac
- .asf to .sng (EA formats)
- .mp4 to .lmp4
- .ogg to .logg
- .opus to .lopus
- .stm to .lstm
- .wav to .lwav (or .xwav in rare original Xbox cases)
- .wav to .lwav
Command line tools don't have this restriction and will accept the original
filename.

View File

@ -35,11 +35,11 @@ VGMSTREAM * init_vgmstream_ea_1snh(STREAMFILE *streamFile) {
ea_header ea = {0};
/* check extension (.asf/as4: common, cnk: some PS games) */
if (!check_extensions(streamFile,"asf,as4,cnk"))
/* checks */
/* .asf/as4: common, cnk: some PS games, .sng: fake for plugins (to mimic EA SCHl's common extension) */
if (!check_extensions(streamFile,"asf,as4,cnk,sng"))
goto fail;
/* check header (first block) */
if (read_32bitBE(0x00,streamFile) != 0x31534E68 && /* "1SNh" */
read_32bitBE(0x00,streamFile) != 0x53454144) /* "SEAD" */
goto fail;