Merge pull request #1270 from NicknineTheEagle/ubi

Ubi SB: Added a new version
This commit is contained in:
NicknineTheEagle 2022-11-21 22:02:09 +03:00 committed by GitHub
commit 0fd985d6c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1530,7 +1530,7 @@ static VGMSTREAM* init_vgmstream_ubi_sb_silence(ubi_sb_header* sb) {
sample_rate = sb->sample_rate;
if (sample_rate == 0)
sample_rate = 48000;
num_samples = sb->duration * sample_rate;
num_samples = (int)(sb->duration * sample_rate);
/* init the VGMSTREAM */
@ -3563,6 +3563,18 @@ static int config_sb_version(ubi_sb_header* sb, STREAMFILE* sf) {
return 1;
}
/* Prince of Persia: Warrior Within (Demo)(2004)(Xbox)-bank */
if (sb->version == 0x00100000 && sb->platform == UBI_XBOX) {
config_sb_entry(sb, 0x68, 0x90);
config_sb_audio_fs(sb, 0x24, 0x28, 0x40);
config_sb_audio_hs(sb, 0x60, 0x58, 0x44, 0x4c, 0x68, 0x64);
sb->cfg.audio_has_internal_names = 1;
config_sb_sequence(sb, 0x28, 0x14);
return 1;
}
/* two configs with same id; try to autodetect or use project file as identifier */
if (sb->version == 0x00120006 && sb->platform == UBI_PC) {
if (test_version_sb(sb, sf, 0x6c, 0xa4) || check_project_file(sf, "gamesnd_myst4.sp0", 1)) {