On 22 Oct 2008, at 22:00, Vladimir Karmishin wrote:

> Right now, I'm not completely understand how does FGFX class work, it
> seems it standing for some kind
> of "global" sound proxy between FG and SimGear.
> If somebody has worked with or on this class - then I'd like to ask
> him for a little help. I need any thoughts,
> imaginations about which way can it be modified to let it work with
> multiple 3d sound emitters.

They way I thought about doing this was to extend the SimGear classes  
with a 'SGSoundSource' object, registered with the sound manager.  
Samples would be played from a source, and sources would have  
position / velocity / etc. Then you'd make AIBase or AIModel own a  
SGSoundSource, and use that for the sound generation.

Internally, you'd need to do the work to convert the public pos/ 
orientation/velocity data of each SGSoundSource into the format  
expected by OpenAL. That's probably a little awkward but not  
intrinsically hard - especially since there are many, many helpers and  
examples already to show converting coordinate systems (geodetic ->  
cartesian, for example).

This is probably not the simplest way to do it, but it's object- 
orientated, and opens up some possibilities in the future - eg giving  
eg sound source its own Nasal hash/functions, so scripts can just play  
a sound on an AI model.

If this seems like a reasonable idea, I can post some headers and  


This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
Flightgear-devel mailing list

Reply via email to