]> git.mxchange.org Git - simgear.git/blob - simgear/sound/README
Pass current-dir down through XMLSound
[simgear.git] / simgear / sound / README
1
2 All code in this directory uses the OpenAL coordinate system for maximum
3 useablity. The OpenAL coordinate system is equal to that of OpenGL with the
4 main difference that objects behind the viewer can still be heard:
5  - positive x is to the right
6  - positive y is upwards
7  - positive z is towards the back of the viewer/listener
8
9 see: http://www.falloutsoftware.com/tutorials/gl/cartesian.gif
10
11 All positions are in cartesian space with a unit length of one meter.
12
13 Velocities are three tuples indicating speed and direction in the same space
14 as positions do (so they are not in the models local space).
15
16
17 There is one SoundMgr that handles multiple SoundGroup classes.
18 Each SoundGroup class handles multiple SoundSample classes.
19
20 A SoundSample class defines the properties of each individual sound like 
21 pitch, volume, position, orientation, sound cone paramters, etc. This 
22 class can be created all over the code but *has* to be assigned to a 
23 SampelGroup before you can hear it. Current sample groups are "atc", 
24 "avionics" and "fx" for the master airplane effects. The position of a 
25 SoundSample is relative to (0,0,0) of the model and hence relative to 
26 the base position of the SampleGroup.
27
28 A SampleGroup class has to be assigned to the SoundManager to be heard 
29 and holds data of a group of samples (maybe 'sample cloud' might be a 
30 good description). This class has to be created for each individual 
31 model that can produce one or more sounds. The SampleGroup class can be 
32 altered by modifying it's volume, position and orientation. 
33 Repositioning this class also means repositioning all it's associated 
34 samples. Altering it's orientation also means repositioning the absolute 
35 (real world) position (and orientation) of the associated sound samples.
36
37 The SoundMaganer can be repositioned which basically means moving the 
38 listener around. It's also possible to alter the listener orientation en 
39 velocity with this class, together with the master volume.
40