The sound system is responsible for playing effects and music sounds in-game and in tools like Sapien and Standalone.
Sound cache
Like the renderer's texture cache, the sound system also holds sound data in an in-memory sound cache. When a sound must be played that is not in this cache, it will be loaded from a map cache file (possibly a shared resource map) or the tags directory depending on the build type of the engine. The cache can hold a maximum of 512 entries or 64 MB.
The predicted resources block seen in some tag classes are meant to give the engine a hint about what sounds (and textures) should be cached.
Environmental audio
MCC and Custom Edition (when using EAX emulation with DSOAL) apply positional and environmental effects to sounds. For this reason, it is important that level artists ensure BSP clusters have an appropriate sound_
Sound obstruction
Sounds which are playing behind an obstruction are muffled. An obstruction is anything which blocks a collision ray test between the sound source and the camera. This may be the BSP or an object with collision geometry.
Channels
The engine has the following channel limits:
- 26 mono 3D channels
- 4 mono channels
- 4 stereo channels
- 4 44k stereo channels
Related HaloScript
The following are related functions that you can use in your scenario scripts and/or debug globals that you can enter into the developer console for troubleshooting.
Function/global | Type | |
---|---|---|
Displays active sound_ | Global | |
Sound sources will be labeled in 3D with their tag path and a their minimum and maximum distances shown as red and yellow spheres, respectively. | Global | |
If enabled, sound cache statistics will be shown in the top left corner of the screen, including how full it is. | Global | |
Shows a graph of sound cache slots at the top of the screen, similar to | Global | |
Displays the utilization of sound channel limits in the top left corner of the screen. | Global | |
Displays two columns of number pairs while sounds play with an unknown meaning. | Global | |
If enabled, shows the tag path of the cluster's current sound_ | Global | |
Sets the gain of the hit sound heard when damage is dealt in multiplayer. Defaults to | Global | |
Writes the sound cache information from | Global | |
Controls how quiet non-dialog sounds are when scripted dialog is playing (sound class must be | Global | |
Controls how "muffled" sounds are when heard behind an obstruction like the BSP or an object with collision geometry. Defaults to | Global |