openal-soft icon indicating copy to clipboard operation
openal-soft copied to clipboard

The whole game sounds choppy.

Open Kuroteba opened this issue 2 years ago • 4 comments

Hello.

Sometimes in games using OpenAL soft, the sound of the whole game is interrupted. Is it possible to fix it?

The game I am using is Ikemen GO ver 0.98.2.

Kuroteba avatar Mar 10 '22 02:03 Kuroteba

What OS are you on, and what version of OpenAL Soft is it happening with? If you're on Linux, what audio system are you using (PipeWire, PulseAudio, ALSA, etc)? Can you provide a trace log from the game? Set the environment variable ALSOFT_LOGLEVEL to 3 when you run the app, and either capture the stderr output or set the environment variable ALSOFT_LOGFILE to a unique path+filename where it can write the log.

kcat avatar Mar 10 '22 04:03 kcat

The OS is Windows 10, the OpenAL Soft version is 1.21.1, and the audio system is Realtek (R) Audio. Trace logs from the game can be downloaded from the following URL.

https://ux.getuploader.com/kuroteba/download/1

Kuroteba avatar Mar 10 '22 06:03 Kuroteba

The log seems to indicate the app is having issues streaming. It's constantly trying to unqueue a buffer from a source despite no buffers being processed to unqueue. It might just be the app naively trying to unqueue to test if a buffer can be unqueued without checking the processed count, but the app source is rather obtuse with how its using OpenAL to tell exactly what it's doing.

Another thing I notice is you seem to have the device set for 192khz playback. This is extreme overkill, a 48khz sample rate is plenty for listening, so its unnecessarily causing about 4x extra load on time-sensitive processing. Given your CPU, I would expect it to handle plain stereo output, but it would be worth setting the device to a more reasonable 48khz sample rate to ease the amount of processing and see if it helps (even if it doesn't help the choppiness, I'd recommend keeping the device at 48khz instead of 192khz).

kcat avatar Mar 10 '22 08:03 kcat

I set the sound setting to 48000 hz, but the sound is still sometimes choppy.

Kuroteba avatar Mar 10 '22 10:03 Kuroteba