Is it safe to modify sound buffers volume each cicle?

Hi, i created a system for sounds that chance intensity when you get close. I call a script before playing a SE and it makes that se loops and changes volume based on the distance from the player. So far so good.
The game though sometimes crashes (even before I implemented this, but was possibly less). I didn't think that this, between all my changes to the source code, could be a culprit but after testing around a bit I saw that the crashes were less if I removed a modification i made to the AudioManage.stopBgm, in wich i changed this._bgmBuffer.stop()this._bgmBuffer.fade() to automatically fade it. Somehow this seems to have made the system less stable (might be a coincidence but it seems it caused a lot of crashes).
So now I'm curious, is it risky to mess with sounds in general? (ex. changing some of the SE sounds volumes at each cicle?)
Check the crash log. There should be specific errors. Keep the debugger open and you can see errors as they happen.
I wish I would get a debugger error. These are real crashes, as in the game just closes itself.

Original thread: https://forums.rpgmakerweb.com/threads/is-it-safe-to-modify-sound-buffers-volume-each-cicle.119789/