CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::AudioSourceComponent Struct Referencefinal

A component that represents a source for emitting audio. More...

#include <CeresEngine/Audio/AudioSource.hpp>

Inheritance diagram for CeresEngine::AudioSourceComponent:
CeresEngine::Component< AudioSourceComponent > CeresEngine::AbstractComponent

Classes

struct  Accessor
 

Public Attributes

AudioAPISourcePtr source
 
Vector< AudioAPIBufferPtrbuffers
 A vector of audio buffers being played by the source.
 
double volume = 1.0
 The source volume. Value should be positive.
 
double minimumVolume = 0.0
 The source minimum volume.
 
double maximumVolume = 1.0
 The source maximum volume.
 
double pitch = 1.0
 The pitch multiplier. Always positive.
 

Additional Inherited Members

- Public Member Functions inherited from CeresEngine::Component< AudioSourceComponent >
const ComponentTypegetComponentType () const noexcept final
 Gets the component type.
 
- Public Member Functions inherited from CeresEngine::AbstractComponent
virtual CE_DISABLE_WARNING_MISSING_OVERRIDE ::CeresEngine::ClassInfo getClassInfo () noexcept
 
virtual ::CeresEngine::ClassInfo getClassInfo () const noexcept
 
virtual ~AbstractComponent ()=default
 Defaulted virtual destructor.
 
- Static Public Attributes inherited from CeresEngine::Component< AudioSourceComponent >
static const ComponentID componentID
 This component type ID.
 
static const ComponentMask mask
 The component mask.
 
static const ComponentTypecomponentType
 Gets the component type.
 

Detailed Description

A component that represents a source for emitting audio.

Audio can be played spatially (gun shot), or normally (music). Each audio source must have an AudioClip to play-back, and it can also have a position in the case of spatial (3D) audio.

Whether or not an audio source is spatial is controlled by the assigned AudioClip. The volume and the pitch of a spatial audio source is controlled by its position and the AudioListener's position/direction/velocity.

Member Data Documentation

◆ buffers

Vector<AudioAPIBufferPtr> CeresEngine::AudioSourceComponent::buffers

A vector of audio buffers being played by the source.

◆ maximumVolume

double CeresEngine::AudioSourceComponent::maximumVolume = 1.0

The source maximum volume.

◆ minimumVolume

double CeresEngine::AudioSourceComponent::minimumVolume = 0.0

The source minimum volume.

◆ pitch

double CeresEngine::AudioSourceComponent::pitch = 1.0

The pitch multiplier. Always positive.

◆ source

AudioAPISourcePtr CeresEngine::AudioSourceComponent::source

◆ volume

double CeresEngine::AudioSourceComponent::volume = 1.0

The source volume. Value should be positive.


The documentation for this struct was generated from the following file: