mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-12-01 01:27:20 +01:00
Add .ogg loops [Tsuki ni Yorisou Otome no Sahou (PC)]
This commit is contained in:
parent
64bc7ac18c
commit
046918589a
@ -614,6 +614,7 @@ static VGMSTREAM* _init_vgmstream_ogg_vorbis_config(STREAMFILE* sf, off_t start,
|
|||||||
const char* comment = NULL;
|
const char* comment = NULL;
|
||||||
|
|
||||||
while (ogg_vorbis_get_comment(data, &comment)) {
|
while (ogg_vorbis_get_comment(data, &comment)) {
|
||||||
|
;VGM_LOG("OGG: user_comment=%s\n", comment);
|
||||||
|
|
||||||
if (strstr(comment,"loop_start=") == comment || /* Phantasy Star Online: Blue Burst (PC) (no loop_end pair) */
|
if (strstr(comment,"loop_start=") == comment || /* Phantasy Star Online: Blue Burst (PC) (no loop_end pair) */
|
||||||
strstr(comment,"LOOP_START=") == comment || /* Phantasy Star Online: Blue Burst (PC), common */
|
strstr(comment,"LOOP_START=") == comment || /* Phantasy Star Online: Blue Burst (PC), common */
|
||||||
@ -702,18 +703,26 @@ static VGMSTREAM* _init_vgmstream_ogg_vorbis_config(STREAMFILE* sf, off_t start,
|
|||||||
force_seek = 1;
|
force_seek = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (strstr(comment,"COMMENT=*loopsample,") == comment) { /* Tsuki ni Yorisou Otome no Sahou (PC) */
|
||||||
|
int unk0; // always 0 (delay?)
|
||||||
|
int unk1; // always -1 (loop flag? but non-looped files have no comment)
|
||||||
|
int m = sscanf(comment,"COMMENT=*loopsample,%d,%d,%d,%d", &unk0, &loop_start, &loop_end, &unk1);
|
||||||
|
if (m == 4) {
|
||||||
|
loop_flag = 1;
|
||||||
|
loop_end_found = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Hatsune Miku Project DIVA games, though only 'Arcade Future Tone' has >4ch files
|
/* Hatsune Miku Project DIVA games, though only 'Arcade Future Tone' has >4ch files
|
||||||
* ENCODER tag is common but ogg_vorbis_encode looks unique enough
|
* ENCODER tag is common but ogg_vorbis_encode looks unique enough
|
||||||
* (arcade ends with "2010-11-26" while consoles have "2011-02-07" */
|
* (arcade ends with "2010-11-26" while consoles have "2011-02-07" */
|
||||||
if (strstr(comment, "ENCODER=ogg_vorbis_encode/") == comment) {
|
else if (strstr(comment, "ENCODER=ogg_vorbis_encode/") == comment) {
|
||||||
disable_reordering = 1;
|
disable_reordering = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strstr(comment, "TITLE=") == comment) {
|
else if (strstr(comment, "TITLE=") == comment) {
|
||||||
strncpy(name, comment + 6, sizeof(name) - 1);
|
strncpy(name, comment + 6, sizeof(name) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
;VGM_LOG("OGG: user_comment=%s\n", comment);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user