Expand description
Distinct audio playback channels for music and sound effects
Voxygen’s audio system uses a limited number of channels to play multiple sounds simultaneously. Each additional channel used decreases performance in-game, so the amount of channels utilized should be kept to a minimum.
When constructing a new AudioFrontend
, the
number of sfx channels are determined by the num_sfx_channels
value
defined in the client
AudioSettings
Structs§
- Ambience
Channel - An AmbienceChannel uses a non-positional audio sink designed to play sounds which are always heard at the camera’s position.
- Ambience
Channel TagIter - An iterator over the variants of AmbienceChannelTag
- Music
Channel - A MusicChannel is designed to play music which is always heard at the player’s position.
- SfxChannel
- An SfxChannel uses a positional audio sink, and is designed for short-lived audio which can be spatially controlled, but does not need control over playback or fading/transitions
- UiChannel
- An UiChannel uses a non-spatial audio sink, and is designed for short-lived audio which is not spatially controlled, but does not need control over playback or fading/transitions
Enums§
- Ambience
Channel Tag - AmbienceChannelTags are used for non-positional sfx. Currently the only use is for wind.
- Loop
Point - Music
Channel Tag - Each
MusicChannel
has aMusicChannelTag
which help us determine when we should transition between two types of in-game music. For example, we transition betweenTitleMusic
andExploration
when a player enters the world by crossfading over a slow duration. In the future, transitions in the world such asExploration
->BossBattle
would transition more rapidly. - UiChannel
Tag
Constants§
- SFX_
DIST_ LIMIT - We watch the states of nearby entities in order to emit SFX at their position based on their state. This constant limits the radius that we observe to prevent tracking distant entities. It approximates the distance at which the volume of the sfx emitted is too quiet to be meaningful for the player.
- SFX_
DIST_ LIMIT_ SQR