-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sound Effects of the same name shouldn't stack. #125
Comments
Ah yes, I've dealt with this problem before. Specifically, in a game which displayed each letter of a message box separately and made a typewriter kind of noise for each letter. RMVXA actually ate every 2nd or 3rd of those sounds and made it sound very unnatural, so to be honest, I'm not sure if the behavior in RMVXA is even intentional or just some obscure implementation detail of the sound backend they use. It certainly wouldn't be wrong to at least introduce some kind of throttling in mkxp, at least for all sound instances played during the same frame. Since you already started experimenting, would you mind finding out what the threshold for RMXP/VXA is before a sound is "swallowed", and if it's related to the current graphics frame at all? (I suspect not) |
From the help file(s):
|
Now, to find out what "short period" means :) |
Sure, I'll dig into it. I expect it'll be somewhere around ~50ms, and I agree that it's not likely to be related to the current graphics frame (because I added "sleep" statements to the sample code and then all the sounds played in RMVX). |
README.md: Clarify OpenSSL license
If you have a script with the following:
...RPG Maker will only play the sound once, while MKXP will "stack" the sound on top of itself. There is either a timeout on sounds with the same filename, or there is handled some other way.
To determine that this is actually how RPG Maker works, I recorded a sound being played once, followed by that sound being played 20 times in both RPG Maker VX and MKXP on Windows. You can clearly see that the waveform is unaffected in RPG Maker, but affected in MKXP. (In Linux, this distortion can actually be heard.)
For my own purposes, I solved the problem this way:
https://github.com/sorlok/mkxp/blob/ld_hacks/src/audio.cpp#L313
Perhaps this isn't really an issue for most games? Stacking sound effects is certainly bad design. Anyway, just thought I'd bring this to your attention.
The text was updated successfully, but these errors were encountered: