Describe the bug
ENIGMA introduces clipping into .ogg audio when the file itself has none.
Steps To Reproduce
Steps to reproduce the behavior:
- Compile this example project and run it.
The audio is expected to not clip.
Ok, I did some more deep investigating of the issue. I really don't see anything out of place with how we are playing the sounds. I even tried playing around a bit with source properties, to make sure they were the defaults. I tried looking at all the dependencies, and to see if there's any issues reported online against the libs, and only discovered I can still play OGG after removing libogg from the Makefile for some reason. Maybe @fundies or @time-killer-games could shed some light on that for me, but I digress.
The main big piece of information I found here is heavy indication this is a WINE bug. MinGW gets a lot of its headers and stuff from WINE (DirectSound for sure) but I am not certain about OpenAL soft. Regardless, I know GameMaker is using OpenAL and on a similar sounding issue posted against OpenAL soft I noticed a game mentioned called Hyper Light Drifter. That immediately struck me as familiar, because it is actually a GameMaker made game.
The reason this wouldn't repro in GMSv1.4 I presume is because YoYo did something recently with respect to linking OpenAL to avoid MP3 licensing concerns or something to that effect. I'm not entirely sure this is the issue, but it definitely seems to fit the bill, until somebody finds out more about this.
Are you not able to reproduce the problem on your machine, Robert? AFAIK this is a problem with the sample size we're using. I think we're using 8 bit samples for our PCM data, so audio files with high volume are being clipped at 255. I can't imagine that being local to one machine.
@JoshDreamland yeah I can, as I said, it's static. But we are using alure to load the sounds (unlike GM) which configures the format for us. I was looking at the docs for OpenAL about how to configure it on the buffer after the fact though. I'll have to do deeper testing then and try manually loading the audio in ENIGMA without alure.
@zulc22 Could you please also file an issue on OpenAL soft if you know how? If not, could you give me permission to use your ogg file? The reason I ask is because I can't seem to repro it with other OGG files (even higher quality ones that fit Josh's description). If you give me permission, I'm a bit busy, but I can get around to writing a self contained OpenAL soft + Alure example for them which should make it easier for them to help figure it out. Also it would help if you could clarify if you are on Windows or Linux.
@RobertBColton i did this on arch linux; and yes you have permission from me to use that .ogg file
i think i encoded the ogg with either ffmpeg or fluidsynth. not quite sure. i'm on windows now so i can't do that much testing on the linux side
and i wasn't cross-compiling or anything; this was a native linux compile and run.
Oh, that's interesting, I thought you were on Windows. That's weird I get what sounds like noise when the song gets above a certain decibels over on Windows 10. Anyway, thanks, when I can, I'll try to submit the OGG with a working example to OpenAL soft. In the interim, you could also try switching out your pulse audio/driver too and upgrading OpenAL.