simgear/simgear/sound
Automatic Release Builder 444e2ffb2d Sound: readWAV: avoid common exceptions.
Avoid exceptions for the common ‘file not found’ case, and instead
return false / nullptr. Erik says it’s fine.
2020-10-15 17:00:30 +01:00
..
.gitignore More ignore files, for 'make check' binaries 2010-08-08 09:55:31 +01:00
aeonwave_test1.cxx Update to the (now GPL) AeonWave version 3.0+ 2017-10-31 10:42:44 +01:00
CMakeLists.txt Only use readwav for OpenAL 2020-04-28 09:41:11 +02:00
filters.cxx Oops, use the proper project name 2017-10-31 10:49:04 +01:00
filters.hxx int16_t needs cstdint 2017-10-31 11:22:39 +01:00
jet_ima4.wav Add test files for mulaw en IMA4 ADPCM 2016-05-30 11:50:11 +02:00
jet_ulaw.wav Add test files for mulaw en IMA4 ADPCM 2016-05-30 11:50:11 +02: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 more modern C++ idioms and use std::unique_ptr for moving daat ownership around 2020-03-26 09:54:28 +01:00
README (try to) properly align model and viewer 2009-10-07 08:19:33 +02:00
readwav.cxx Sound: readWAV: avoid common exceptions. 2020-10-15 17:00:30 +01:00
readwav.hxx Make sure block align is in samples when calling alBufferi with AL_UNPACK_BLOCK_ALIGNMENT_SOFT 2016-06-01 23:12:55 +02:00
sample_group.cxx Switch from doing the calculations ourselves in case of a bad_doppler implementation to using alDopplerFactor 2020-04-12 14:50:12 +02:00
sample_group.hxx Move more modern C++ idioms and use std::unique_ptr for moving daat ownership around 2020-03-26 09:54:28 +01:00
sample.cxx Move more modern C++ idioms and use std::unique_ptr for moving daat ownership around 2020-03-26 09:54:28 +01:00
sample.hxx Move more modern C++ idioms and use std::unique_ptr for moving daat ownership around 2020-03-26 09:54:28 +01:00
soundmgr_aeonwave.cxx Remove some debugging statements 2020-04-12 14:53:16 +02:00
soundmgr_openal.cxx Sound: readWAV: avoid common exceptions. 2020-10-15 17:00:30 +01:00
soundmgr_test2.cxx Use a better way to set the listener position and orientation 2019-11-08 10:51:56 +01:00
soundmgr_test.cxx Use a better way to set the listener position and orientation 2019-11-08 10:51:56 +01:00
soundmgr.hxx Switch from doing the calculations ourselves in case of a bad_doppler implementation to using alDopplerFactor 2020-04-12 14:50:12 +02:00
xmlsound.cxx XMLSound: Avoid using exceptions for missing file 2020-10-05 14:21:37 +01:00
xmlsound.hxx XMLSound: Avoid using exceptions for missing file 2020-10-05 14:21: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.