Is it safe to modify sound buffers volume each cicle?

orcomarcio

Veteran
Veteran
Joined
Nov 26, 2015
Messages
104
Reaction score
20
First Language
Italian
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?)
 

Windows i7

Veteran
Veteran
Joined
Nov 4, 2017
Messages
378
Reaction score
1,157
First Language
English
Primarily Uses
RMMV
Check the crash log. There should be specific errors. Keep the debugger open and you can see errors as they happen.
 

orcomarcio

Veteran
Veteran
Joined
Nov 26, 2015
Messages
104
Reaction score
20
First Language
Italian
I wish I would get a debugger error. These are real crashes, as in the game just closes itself.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Posts

Latest Profile Posts

Anyone have advice for recruiting friends to bugtest with you? I had some buddies volunteer without me asking, and we agreed on dates and times... and they all just flaked...
A mousefolk sprite I made, I think I did good.
Discovering math. functions for damage formulas was one of the greatest things for me.
It's very useful for balancing skills to work in a variety of possible circumstances.
For example if you have a skill that is supposed to work for both mages and warriors:
Code:
Math.max(a.atk * 2 - b.def, a.mat * 2 - b.mdf)
SpaceX: First-ever successful (manned) commercial spaceflight!! In these terrible and self-sabotaging times for the world, that's a ray of excitement and hope I needed badly.

Forum statistics

Threads
98,019
Messages
948,579
Members
129,276
Latest member
abhikhurana
Top