OpenArena/engine

VIS optimization mutes target_speaker sounds. An ioquake3 OpenAL implementation bug, I guess.

The-Gig opened this issue · 2 comments

It has been noticed that, when using OpenAL sound mode, sounds emitted from target_speaker entities are abruptly ended as soon as the area containing the entity is hidden by VIS optimization. Depending from the map, this may result being unpleasant.
So I made the test map you can find attached here. It contains audiotest_vis and audiotest_novis bsp files so you can see/hear the difference. I'm not sure whether it only applies to target_speaker or also other kind of entities in the map which may emit sounds.

The map also allows to test a somewhat related "problem" where the game doesn't play in-game sounds (such as granades bouncing or exploding) when their source is hidden by VIS optimization (#79). But, while maybe a bug too, that does not apply to OpenAL mode only, it's a behavior since the original quake3 engine.

audiotest.zip
The zip contains the pk3 with the map and a readme file where I describe the tests in more detail. It's under gplv2+.

Actually SDL sound handles sounds wrong, imo. A long time ago I talked about that PVS/VIS problem here, and how to reproduce: https://discourse.ioquake.org/t/ioquake3-sound-options-openal-vs-sdl/701. So it is a well know bug, especially because SDL didn't stop sounds after they are triggered for the first time, moreover SDL's VIS handling also doesn't react on closing/opening doors (see q3dm12), OpenAL does.
What I wrote there is basically still true I think, though OpenAL Soft changed and improved a lot since: https://github.com/kcat/openal-soft. It can also now fade out sounds. Ioquake3 is outdated.
Please note, I don't want to argue against you, both sound backends have its strengths and weaknesses I think.

Bishop found this topic, it looks like part of it might be related: zturtleman/spearmint#300