Module rg3d_sound::context[][src]

Expand description

Context module.

Overview

Context is a sort of “sound scene” - an isolated storage for a set of sound sources, effects, filters, etc. rg3d-sound can manage multiple contexts at the same time. Main usage for multiple contexts is a typical situation in games where you have multiple scenes: a scene for main menu, a scene for game level, a scene for inventory and so on. With this approach of multiple contexts it is very easy to manage such scenes: for example your main menu have a complex scene with some sounds and you decide to load a game level - once the level is loaded you just set master gain of main menu context and it will no longer produce any sounds, only your level will do.

Structs

SoundContext

See module docs.

State

Internal state of context.

Enums

DistanceModel

Distance model defines how volume of sound will decay when distance to listener changes.

Constants

SAMPLE_RATE

Sample rate for output device. TODO: Make this configurable, for now its set to most commonly used sample rate of 44100 Hz.