MZ Audio Constantly Fading In and Out with Ocram_Audio

Hey folks,

I am using Ocram_Audio (https://ocram-codes.net/), which is a wonderful plugin that adds audio buffering, and more importantly, proximity-based background sounds for events.

While the plugin has been amazing for getting ambient sounds coming from certain events, it has a frustrating side-effect: the BGM fades in/out every time you change maps, even if the BGM is not changing (ie. two maps with the same BGM, or from a map with BGM to a map with no BGM set, which normally plays continuously).

This has lead to an odd effect where, say, moving from room-to-room in a house fades the audio in and out constantly, or clicking buttons on the title screen to load a game or change options fades the theme music in/out every time. It gets pretty jarring after a while.

I was wondering if someone could take a look at the plugin code and see if there seems to be anything specific causing this fade effect, so that maybe I can patch it out. Even if it causes a brief gap or stutter to remove it, that is preferable to all this fading. I have taken a look myself and can't seem to figure it out.

It's worth noting that this is also unrelated to any plugin settings. There is an "Audio fade" parameter, but it doesn't affect this at all.

I've posted on Ocram's thread, but haven't gotten a reply and am not sure how active they are these days.

Any help is much appreciated!

Original thread: https://forums.rpgmakerweb.com/threads/audio-constantly-fading-in-and-out-with-ocram_audio.165838/