Re: multiple listeners

Chris Robinson <[email protected]>
Newsgroups gmane.comp.lib.openal
Message-ID <[email protected]>
On Tuesday 01 December 2009 5:58:11 pm Terry Welsh wrote:
> I'm planning 4-player split-screen multiplayer for a game and must
> have multiple listeners for sound effects.  Can someone tell me if
> I've got anything wrong here?
> 
> As best I can tell from reading old posts and stuff there will never
> be multiple listener support in OpenAL (at least, not in the
> foreseeable future).

Technically, OpenAL Soft does support it. You can't get multiple listeners in 
a single context, but you can create multiple contexts from a single device 
and each context will have one listener. All contexts on a given device will 
go into a single mix, so there won't be any added latency. The contexts can 
share buffers (as they're on the same device), but not sources (each context 
has its own list of sources).

However, you may need the latest Git/SVN version for this to work properly. 
There's a few bugs in 1.10 that can be tripped over.

> The best way I've heard of simulating multiple listeners in OpenAL is
> to set the listener to (0,0,0) and do the necessary transformations to
> place sounds relative to the listener.  Then for multiple listeners
> you would play the same sound through multiple sources at different
> positions relative to the listener.  Is that about right?  Are there
> any other decent ways to do this?  I'm a bit worried that I'll run low
> on sources on some computers.  For example, I have one computer with
> motherboard audio that only provides 14 sources, which is barely
> enough for single player.

Software devices should be able to provide at least 256 sources (Generic 
Software, or OpenAL Soft's devices). If hardware can only provide 14 sources, 
then it's not really capable of handling what you need anyway, so such users 
should switch to software. I think any halfway decent hardware these days can 
provide at least 32.
_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.