FlightGear Newsletter February 2011: Difference between revisions

Jump to navigation Jump to search
Line 7: Line 7:
== Development news ==
== Development news ==
===Sound files for 3D Audio===
===Sound files for 3D Audio===
Recently there seems to be some confusion about what types of sound files are supported for 3D audio rendering. More and more stereo files showed up resulting in reports of soundmanager problems. Let's explain a bit more about how 3D audio works, especially for OpenAL.
There seems to be some confusion about what types of sound files are supported for 3D audio rendering. Let's explain a bit more about how 3D audio works.


A 3D audio, or spatialized audio, implementation consists of one listener (like the OpenGL viewer) and multiple audio sources. A listener is placed at a specific location and has an orientation (view direction). Sources are placed in the scene at their own location and an emission direction which is used to calculate the sound cone for non omni-directional sounds (sound sources that sound louder in one direction and softer or even quiet in the opposite direction). Sound sources can best be seen as a single dot emitting sound waves.
A 3D audio, or spatialized audio, implementation consists of one listener (like the OpenGL viewer) and multiple audio sources. A listener is placed at a specific location and has an orientation (view direction). Sources are placed in the scene at their own location and have an emission direction which is used to calculate the sound cone for non omni-directional sounds (sound sources that sound louder in one direction and softer or even quiet in the opposite direction). Sound sources can best be seen as a single dot emitting sound waves.The relative positions of the sources and the listener is used to calculate where the sources should be positioned in the listeners sound sphere.


The relative positions of the sources and the listener are used to calculate where the sources should be positioned in the listeners sound sphere. Now if a sound source would be anything but mono it is almost impossible to guess how to handle all the channels in 3D space;
If a sound source would be anything but mono it is almost impossible to guess how to handle all the channels in 3D space;
* do they get mixed together which makes stereo files rather useless anyhow.
* Do they get mixed together?
* do the the separate tracks get positioned with a slight offset to each other, which basically means mixing them together at any distance but very near.
* Do the tracks get positioned with a slight offset to each other? This in effect means mixing them together when the source is not close to the listener.
* or do they get positioned at the same location but with a sound direction offset of 180⁰, which again means mixing them together for omni-directional sources.
* Do they get positioned at the same location but with a sound direction offset of 180⁰? This means mixing them together if the sound is omni-directional.


There is something to say for any of the choices but you can bet that if one of the three was chosen someone else comes by and wants it to be different.
There is something to say for any of the choices but you can bet that if one of the three was chosen someone else comes by and wants it to be different.


For this reason it is specified that only mono files will be used for 3D audio processing and stereo files will mixed using the stereo mixer instead. Trying to set a position or direction for a stereo file will result in an error like:
For this reason it is specified that only mono files will be used for 3D audio processing and stereo files will be mixed using the stereo mixer instead. Trying to set a position or direction for a stereo file will result in an error like:
  ''Failed to load WAV file: Unsupported mode within an otherwise usable file type''
  ''Failed to load WAV file: Unsupported mode within an otherwise usable file type''


160

edits

Navigation menu