Wednesday, April 1, 2015

FMod - Music Autodetect

Somebody noticed that Abiathar does not preserve extra songs when attaching existing audio resources to a dependency file. That is, if you attach some audio files where you've inserted more songs than the vanilla game can deal with, the extra ones are essentially removed. (FleexCore2 doesn't bother to load them unless its chunk ID falls between ImfStart and ImfEnd.) This can be worked around by changing the ImfStart entry under AudioSettings in the dependency file before attaching audio, but that's trickier than most people want to deal with.

So, since attaching pre-extended audio files is probably not a super rare thing, I decided to make it a little nicer. Abiathar now scans backward from the vanilla ImfStart to see if there are any populated chunks in the no man's land between AdlibEnd and ImfStart. If there are, it auto-adjusts the ImfStart value under AudioFiles to make the patching happen properly.

No comments:

Post a Comment