Closed Cazadorro closed 4 years ago
For example, of the following, what are their responsibilities what to they do, what is the intent behind making the class?
The majority of classes are basically equivalent to OpenAL objects of the same name (notable exceptions being SourceGroup
s and Decoder
s).
Buffer? Buffer loaded sound data given a decoder and is played from Source?
A buffer of preloaded PCM samples, which currently come from a Decoder
.
Source? - assume source of sound? responsible for playing a stream with 3D sound properties which are configurable?
A sound source, which plays samples. It may be a 3D source in which case it will apply panning and distance attenuation to simulate a sound at the given position. The samples either come from a Buffer
where they've been preloaded, or from a Decoder
where it reads them over time and discards the samples already played.
SourceGroup? - I assume is a group of sources, which can configure multiple sources as a group?
A collection of Source references, which are modified as a group. For example, setting a SourceGroup
's gain to 0.5
will reduce the gain of all sources in the group by half (on top of whatever adjustments each individual source has).
Context? - the entire sound environment (actual listener, source group, and special environmental effects)?
Contains and maintains the entire audio environment, it's settings and both the active (e.g. sources, auxiliary effect slots) and inactive (e.g. buffers, effects) components.
Effect? Pre-made effects which modify the properties of sound in a given context. ?
A collection of settings/parameters detailing an effect.
Device? Interface to physical media to play/record?
An object representing the output of the audio mix (Alure currently doesn't do recording). Normally this is a system audio output stream, which it mixes with any other process's audio and gives to a hardware audio device. On some systems, it may be an actual hardware port.
DeviceManager? Holds multiple devices?
Global state which can query non-device-specific information, and maintains open devices.
AuxiliaryEffectSlot? Some how works with effect? not sure how?
An effect processor. It takes the output mix of zero or more sources, applies DSP for the desired effect (as configured by a given Effect
object), then adds to the output mix.
issues solved in comments.
For example, of the following, what are their responsibilities what to they do, what is the intent behind making the class?
Buffer? Buffer loaded sound data given a decoder and is played from Source?
Source? - assume source of sound? responsible for playing a stream with 3D sound properties which are configurable?
SourceGroup? - I assume is a group of sources, which can configure multiple sources as a group?
Context? - the entire sound environment (actual listener, source group, and special environmental effects)?
Effect? Pre-made effects which modify the properties of sound in a given context. ?
Device? Interface to physical media to play/record?
DeviceManager? Holds multiple devices?
AuxiliaryEffectSlot? Some how works with effect? not sure how?