[Openal-devel] Doing sound fields

Chris Robinson chris.kcat at gmail.com
Mon Mar 17 15:25:25 PDT 2008


On Monday 17 March 2008 02:41:30 pm Jason Daly wrote:
> I don't know if it's planned, but I agree that we need a way to do
> this.  My question is whether this is an API thing or an implementation
> thing.
>
> For example, Creative's X-Fi drivers have a way to configure speakers in
> the manner that you suggested.  There's no reason why this information
> couldn't be used to drive their native OpenAL implementation and get the
> results you mentioned.  In the same way, OpenAL-Soft could allow this
> kind of information to be specified in the configuration file.

But it's a very app-specific setting. If you have a circular speaker setup 
with a radius of 10 feet, for example, and have a source that's 10 feet away 
from the listener, it should only play on the two speakers it would be 
closest to (and as it moves closer, it would use more speakers to envelop the 
listener and give the effect that the source is inside the field, as opposed 
to on the edge of it).

The problem is.. what's 10 feet in an OpenAL program? OpenAL is designed to be 
very agnositic with respect to real-world-to-unit sizes (ie. a unit is a 
unit; there is no correlation to inches or feet, and its up to the app to 
determine how much space a unit covers). A blanket implementation 
configuration setting may work for one app, but another app could use a 
different scale.

My idea would be to use the min/reference distance of a source to specify the 
listener's radius. An app would have a configuration setting for the number 
of feet in the user's speaker setup, and would translate that to its own unit 
scale to apply to generated sources (a context attribute wouldn't work since 
those are only integers). Of course, this means apps would have to be aware 
of it for it to work correctly.


More information about the Openal-devel mailing list