Game Development Reference
In-Depth Information
Figure 11-12.
Project-wide audio settings handled by the AudioManager
The volume setting of the Audio Source component allows you to set its relative volume. The
AudioManager
Volume
property controls the overall volume of all sounds that are playing.
For 3D audio, the Volume Rolloff allows you to choose between Linear, Logarithmic, and Custom.
Rolloff Scale
in the AudioManager is where you can adjust the shape of the Logarithmic curve to
affect the rate of rolloff.
Speed of Sound
defaults to the speed of sound at sea level and has an affect on Doppler-enabled
sounds. The Audio Source's Doppler Level property sets how much of a Doppler distortion effect is
applied to an audio clip, while the AudioManager's
Doppler Factor
sets how discernible it is, where
0 is completely turned off and 1 is the most audible.
Default Speaker Mode
sets the number of channels available and defaults to 2 for stereo speakers.
The
DSPBuffer Size
is best left alone, as it has to do with how the CPU processes the aggregate
sound files, and is an advanced topic beyond the scope of this topic.
Audio Testing
At the top of the Scene view, you'll find a button with a speaker on it that represents the Audio
Preview mode (Figure
11-13
). Rather than having to playtest the game in order to test the game
audio, you can simply toggle on the Audio Preview mode and move the scene camera around the
game world.
Figure 11-13.
Audio Preview toggle in the Scene view