Hey.
I'm currently facing the problem of how to implement sound effects emitted by the environment.
Examples for this would be a stream of lava, a river or any other objects that spans over a larger area.
I'm using the OpenAL API and I'm entirely unsure how to set the correct information on the sound source object:
This is easy to do for an object like an NPC or a sword-swing: Those have a well-defined single position in the game world,
so I just give OpenAL the position and it manages everything else.
But what about large objects that span a wide area?
Do I give them a position as well and 'move' the sound source?
Find the closest point between the listener and the object-boundary and position the sound source at that place?
That seems inefficient, because I'd had to do a ConvexSweepTest or something similar with Bullet whenever the player is moving,
for every environmental sound source in his vicinity.
I've never really done anything with 3D sound before and would like some pointers.