Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
SCUMM: COMI: Fix #4635/#10473 and #4391 (iMUSE Digital) #2596
This commit fixes the early stopping of ArriveBarber sequence, during the first arrival in Barbery Coast.
This commit implements fade-ins during song transitions (e.g. statePreVooOut --> statePreVooIn --> statePreVooLady) and also between regions of the same song (e.g. any JUMP instruction used for looping songs).
This results in a linear cross-fade. This is not ideal since the correct thing would be to implement a logarithmic crossfade (or "audio taper"), but for now this will do without changing too much of the current codebase. I'm still going to investigate the possibility of implementing this in a correct way.
I know, I know the implementation looks terrible, a "real" fix would supposedly use fade tracks also for fade-ins, and require some kind of cloneToFadeInTrack(track, fadeDelay) to be used together with cloneToFadeOutTrack.
I didn't do this for two reasons:
Having said that, this fix unfortunately does not account for the sync issue between fade-out and parent track, but it already sounds much better than the current implementation (even in the 30% of times in which the fade-outs happen not to be in sync). And besides, these bugs have remained unfixed for more than 10 years, so at this point I doubt anyone else has a plan to have a proper attempt at this anytime soon.
There might be another solution, for sure, but it's currently beyond my knowledge, I'm sorry
Thanks for the answer, I would love to improve the solution (also, I'm working on an alternate version of cloneToFadeOutTrack right know, I hope my idea works).
Changes introduced in the commit above (all exclusive to COMI):
What's left to do?
I'll be sure to send a ticket in the issue tracker about the last point, and I won't work both of these points for now, I'd just love to get these current fixes in the master, for now.