OpenArena / engine

OpenArena modifications to the ioquake3 engine
http://openarena.ws
GNU General Public License v2.0
211 stars 50 forks source link

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

Open The-Gig opened 2 years ago

The-Gig commented 2 years ago

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 (https://github.com/OpenArena/engine/issues/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+.

ghost commented 2 years ago

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.

The-Gig commented 5 months ago

Bishop found this topic, it looks like part of it might be related: https://github.com/zturtleman/spearmint/issues/300