simgear/simgear/sound
2012-03-22 23:54:01 +01:00
..
.gitignore More ignore files, for 'make check' binaries 2010-08-08 09:55:31 +01:00
CMakeLists.txt Build system tweaks to support SIMGEAR_SHARED building two libraries. Work in progress, does not link yet. 2011-11-28 22:43:57 +00:00
jet.wav Initial commit of the new sound system, expect more updates to follow 2009-10-06 07:22:06 +02:00
openal_test1.cxx Move ALUT 1.0 variables inside the #ifdef, to avoid some compiler warnings. 2011-10-29 11:06:24 +01:00
openal_test2.cxx Set the listener position to it's default value, just like the samples position 2010-09-10 15:02:37 +02:00
openal_test3.cxx Second attempt to fixed OpenAL tests. 2010-09-06 14:27:58 +01:00
openal_test4.cxx Initial commit for a sample queue extension. 2010-08-02 10:10:58 +02:00
README (try to) properly align model and viewer 2009-10-07 08:19:33 +02:00
sample_group.cxx sounds tied to listeners are never out of range 2011-12-30 11:16:58 +01:00
sample_group.hxx fix sound buffer resource leak 2011-12-04 21:25:42 +01:00
sample_openal.cxx Add an out_of_range property to sound samples. If set the sound is set to non playing (which allows the OpenAL sound the be free'd) 2011-12-13 11:09:12 +01:00
sample_openal.hxx Fix final simgear GCC warnings. 2012-01-09 21:51:09 +01:00
sample_queue.cxx Removal of PLIB/SG from SimGear 2010-08-07 13:55:33 +01:00
sample_queue.hxx Actually enable looping for a sample queue 2010-08-02 11:43:53 +02:00
soundmgr_openal.cxx Degarde lack of free sounds message from alert to bulk for this release. 2011-12-24 11:13:49 +01:00
soundmgr_openal.hxx Properly handle stereo wav files; remove data buffer and set buffer to FAILED_BUFFER 2011-12-07 10:41:57 +01:00
xmlsound.cxx Don't crash when "avionics == NULL". 2012-03-22 23:54:01 +01:00
xmlsound.hxx Clean header dependencies of condition.hxx - introduce a new header, propsfwd.hxx, for common case of headers that only need SGPropertyNode_ptr and SGCondition_ptr 2011-07-30 10:48:37 +01:00

All code in this directory uses the OpenAL coordinate system for maximum
useablity. The OpenAL coordinate system is equal to that of OpenGL with the
main difference that objects behind the viewer can still be heard:
 - positive x is to the right
 - positive y is upwards
 - positive z is towards the back of the viewer/listener

see: http://www.falloutsoftware.com/tutorials/gl/cartesian.gif

All positions are in cartesian space with a unit length of one meter.

Velocities are three tuples indicating speed and direction in the same space
as positions do (so they are not in the models local space).


There is one SoundMgr that handles multiple SoundGroup classes.
Each SoundGroup class handles multiple SoundSample classes.

A SoundSample class defines the properties of each individual sound like 
pitch, volume, position, orientation, sound cone paramters, etc. This 
class can be created all over the code but *has* to be assigned to a 
SampelGroup before you can hear it. Current sample groups are "atc", 
"avionics" and "fx" for the master airplane effects. The position of a 
SoundSample is relative to (0,0,0) of the model and hence relative to 
the base position of the SampleGroup.

A SampleGroup class has to be assigned to the SoundManager to be heard 
and holds data of a group of samples (maybe 'sample cloud' might be a 
good description). This class has to be created for each individual 
model that can produce one or more sounds. The SampleGroup class can be 
altered by modifying it's volume, position and orientation. 
Repositioning this class also means repositioning all it's associated 
samples. Altering it's orientation also means repositioning the absolute 
(real world) position (and orientation) of the associated sound samples.

The SoundMaganer can be repositioned which basically means moving the 
listener around. It's also possible to alter the listener orientation en 
velocity with this class, together with the master volume.