mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-14 18:47:39 +01:00
Merge pull request #594 from NicknineTheEagle/ea
EAAC: Fixed looped RAM sounds
This commit is contained in:
commit
63365162df
@ -1343,17 +1343,13 @@ static size_t calculate_eaac_size(STREAMFILE *streamFile, eaac_header *ea, uint3
|
||||
stream_size += block_size;
|
||||
block_offset += block_size;
|
||||
|
||||
/* RAM data only consists of one block */
|
||||
if (is_ram)
|
||||
break;
|
||||
|
||||
if (ea->version == EAAC_VERSION_V0 && block_id == EAAC_BLOCKID0_END) {
|
||||
if (ea->loop_offset > 0) {
|
||||
if (!looped) looped = 1;
|
||||
else break;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
if (is_ram) {
|
||||
/* RAM data only consists of one block (two for looped sounds) */
|
||||
if (ea->loop_start > 0 && !looped) looped = 1;
|
||||
else break;
|
||||
} else if (ea->version == EAAC_VERSION_V0 && block_id == EAAC_BLOCKID0_END) {
|
||||
if (ea->loop_offset > 0 && !looped) looped = 1;
|
||||
else break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user