two listening sources

jordi

27-02-2008 10:24:23

Hi,
I am collaborating in a opensource robotic simulator (http://playerstage.sourceforge.net/wiki/Gazebo), it uses Ogre3D for rendering and I am integrating OgreAL for audio.

The problem is that we want to have an arbitrary number of robotos "hearing" the sounds of the environment. This means that we need an arbitraty number of OgreALListeners.

I think that the limit of having only one OgreALListener comes from OpenAL directly and little can be done.
Anyway, any workaround or idea will be very welcomed.

BTW, OgreAL is the easiest library to use in the world, thanks!

fooguru

15-03-2008 04:30:38

I second this question

CaseyB

15-03-2008 05:18:29

First let me say that I am so sorry missed this post! I don't know how it happened!

I think that the limit of having only one OgreALListener comes from OpenAL directly and little can be done.
This is correct, OpenAL allows one Listener per context and OgreAL manages one context of OpenAL. In order to have multiple listeners you would need to open the same device multiple times and load all of the sounds into each of the listeners. It's a awful lot of overhead. And I can't really image how the output from multiple listeners coming out the same set of speakers would be anything coherent.

BTW, OgreAL is the easiest library to use in the world, thanks!
I am glad you like it! :D

jordi

17-03-2008 18:08:48

In fact we don't need to mix the sounds of all the listeners. We only need to be able to get the sounds.
I explain a little bit further.

Imagine a simulation of a house with 3 robots in it, each of them have a microphone.
They will be performing some action that may involve being in the same room with other robots or no.
Our simulator provides a bunch of external interfaces. So if an external program opens the robot1 camera interface, a streaming of images will be available to that program for each frame. Same goes for contact sensor, position and rotation of wheels, etc. And the same must be done for audio.
It may happen that all the 3 robots with their 3 microphones interfaces are opened by 3 external programs.
Each program will receive the sounds from the position of its microphone as a stream.
Having the 3 streams feed to the programs does not imply that the programs will want to reproduce it on the computer, in fact they will likely silently process them.

I still don't see a good solution for this problem ....