MOS
Public Member Functions | Public Attributes | List of all members
mos::aud::Source Class Referencefinal

Base class for the audio source. More...

#include <source.hpp>

Public Member Functions

 Source (const glm::vec3 &position=glm::vec3(0.0f), const glm::vec3 &velocity=glm::vec3(0.0f), float pitch=1.0f, float gain=1.0f, bool loop=false, bool playing=false, float obstructed=0.0f)
 
auto id () const -> unsigned int
 Unique id. More...
 

Public Attributes

glm::vec3 position {glm::vec3(0.0f)}
 Position. More...
 
glm::vec3 velocity {glm::vec3(0.0f)}
 Velocity.
 
float pitch {1.0f}
 Pitch. More...
 
float gain {1.0f}
 Volume.
 
bool loop {false}
 The source is looping.
 
bool playing {false}
 The source is playing. More...
 
float obstructed {0.0f}
 How much the source is obstructed. More...
 

Detailed Description

Base class for the audio source.

Either streamed or direct from memory.

Member Function Documentation

◆ id()

auto mos::aud::Source::id ( ) const -> unsigned int

Unique id.

Member Data Documentation

◆ obstructed

float mos::aud::Source::obstructed {0.0f}

How much the source is obstructed.

0.0 - 1.0

◆ pitch

float mos::aud::Source::pitch {1.0f}

Pitch.

◆ playing

bool mos::aud::Source::playing {false}

The source is playing.

◆ position

glm::vec3 mos::aud::Source::position {glm::vec3(0.0f)}

Position.


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