Ancurio / mkxp

Free Software implementation of the Ruby Game Scripting System (RGSS)
GNU General Public License v2.0
509 stars 128 forks source link

Loud clipping/wrong sample when BGM loops #206

Closed dogtopus closed 5 years ago

dogtopus commented 5 years ago

When a BGM loops, there is an audible clipping, or wrong sample gets played for a short period of time. I suspect this is a buffering issue somewhere in the audio output code.

Happens on latest master with ArchLinux openal 1.19.0-1. Not sure when this was introduced but I assume it was recent because I never had this problem in early 2017-ish.

Ancurio commented 5 years ago

What kind of loop is it? ogg with the loopstart/loopend tags, or just plain repeat? Does it happen with all files?

dogtopus commented 5 years ago

Seems that the issue affects both natual loops and tagged loops. Some of the files sound fine, although I am not sure whether they just play normally or the played sample is "tame" by chance. So far I only confirmed this on OGG files. I did not test other sound format using minimal test cases, although I suspect that they are also being played incorrectly. I can certainly do more tests if necessary.

Also this issue may also affect BGS playback as well, according to my experience with several games that previously did not have this issue.

dogtopus commented 5 years ago

I cannot seem to reproduce this anymore. It was probably an issue with external libraries.