MZ Forcing SE to Stop Playing After Battle?

This is going to require some context. I'm using this plugin to play a specified sound at the Yanfly Level Up screen.

The sound is kind of long, though, and it keeps playing until completed, even after the level up screen is closed.

I'm wondering if there's a way I could modify this plugin or make a new one that stops sound effects when the player returns to the map.

Thanks in advance! 🙂
Try this. Copy and paste into a text editor, save as a *.js file, include as a plugin.

Code:
var origProcessVictoryFinish = BattleManager.processVictoryFinish;
BattleManager.processVictoryFinish = function()
{
    origProcessVictoryFinish.call(this);
    AudioManager.stopSe();
};
This works! 😀 Thank you so much, this was really bothering me lol
Try this. Copy and paste into a text editor, save as a *.js file, include as a plugin.

Code:
var origProcessVictoryFinish = BattleManager.processVictoryFinish;
BattleManager.processVictoryFinish = function()
{
    origProcessVictoryFinish.call(this);
    AudioManager.stopSe();
};

Original thread: https://forums.rpgmakerweb.com/threads/forcing-se-to-stop-playing-after-battle.165233/