Oficina Framework  1.3
Games Framework
OficinaFramework::AudioSystem Class Reference

Groups audio-related management controls. Use this to play background music, sfx, and effects. More...

#include <AudioSystem.hpp>

Classes

class  Audio
 Represents an audio file to be loaded. Cannot be created nor destroyed on its own. More...
 
class  AudioPool
 A class for loading audio, both sound effects or background music. More...
 
class  AudioSource
 Describes the source of the audio, so effects such as positional sound can be used. More...
 

Public Types

enum  AudioType { OF_AUDIO_TYPE_WAV, OF_AUDIO_TYPE_OGG }
 An enumeration of supported audio types that can be loaded. More...
 

Static Public Member Functions

static void init ()
 Initializes the AudioSystem. More...
 
static void update ()
 Updates the AudioSystem. More...
 
static void dispose ()
 Disposes the AudioSystem. More...
 
static ALuint getListenerPitch ()
 Gets the Audio Listener's pitch. More...
 
static ALuint getListenerGain ()
 Gets the Audio Listener's gain. More...
 
static vec3 getListenerPosition ()
 Gets the Audio Listener's position. More...
 
static vec3 getListenerVelocity ()
 Gets the Audio Listener's velocity. More...
 
static vec3 getListenerOrientationAt ()
 Gets where the Audio Listener is looking at. More...
 
static vec3 getListenerOrientationUp ()
 Gets the Audio Listener's normalized up direction. More...
 
static bool isMute ()
 Checks if AudioSystem is mute. More...
 
static void setListenerPitch (ALuint val)
 Set the Audio Listener's pitch. More...
 
static void setListenerGain (ALuint val)
 Set the Audio Listener's gain. More...
 
static void setListenerPosition (vec3 val)
 Set the Audio Listener's position. More...
 
static void setListenerVelocity (vec3 val)
 Set the Audio Listener's velocity. More...
 
static void setListenerOrientation (vec3 at, vec3 up)
 Set the Audio Listener's orientation. More...
 
static void setMute (bool val)
 Sets the Mute flag for AudioSystem. More...
 

Friends

class EngineCore
 

Detailed Description

Groups audio-related management controls. Use this to play background music, sfx, and effects.

Member Enumeration Documentation

◆ AudioType

An enumeration of supported audio types that can be loaded.

Enumerator
OF_AUDIO_TYPE_WAV 

WAV audio type.

Warning
Not yet implemented.
OF_AUDIO_TYPE_OGG 

OGG Vorbis audio type.

Member Function Documentation

◆ dispose()

static void OficinaFramework::AudioSystem::dispose ( )
static

Disposes the AudioSystem.

◆ getListenerGain()

static ALuint OficinaFramework::AudioSystem::getListenerGain ( )
static

Gets the Audio Listener's gain.

Returns
An OpenAL-compatible uint for the gain.

◆ getListenerOrientationAt()

static vec3 OficinaFramework::AudioSystem::getListenerOrientationAt ( )
static

Gets where the Audio Listener is looking at.

Returns
A vec3 containing the position coordinates.

◆ getListenerOrientationUp()

static vec3 OficinaFramework::AudioSystem::getListenerOrientationUp ( )
static

Gets the Audio Listener's normalized up direction.

Returns
A vec3 containing the coordinates.

◆ getListenerPitch()

static ALuint OficinaFramework::AudioSystem::getListenerPitch ( )
static

Gets the Audio Listener's pitch.

Returns
An OpenAL-compatible uint for the pitch.

◆ getListenerPosition()

static vec3 OficinaFramework::AudioSystem::getListenerPosition ( )
static

Gets the Audio Listener's position.

Returns
A vec3 containing the position coordinates.

◆ getListenerVelocity()

static vec3 OficinaFramework::AudioSystem::getListenerVelocity ( )
static

Gets the Audio Listener's velocity.

Returns
A vec3 containing velocity values.

◆ init()

static void OficinaFramework::AudioSystem::init ( )
static

Initializes the AudioSystem.

◆ isMute()

static bool OficinaFramework::AudioSystem::isMute ( )
static

Checks if AudioSystem is mute.

Returns
Whether the mute flag is active or not.
Warning
AudioSource class will NOT check for mute flags all the time, due to performance. Either mute the audio before or after you need it. Whenever you query a Play command, AudioSource will mute accordingly.

◆ setListenerGain()

static void OficinaFramework::AudioSystem::setListenerGain ( ALuint  val)
static

Set the Audio Listener's gain.

Parameters
valUnsigned integer value that should be set.

◆ setListenerOrientation()

static void OficinaFramework::AudioSystem::setListenerOrientation ( vec3  at,
vec3  up 
)
static

Set the Audio Listener's orientation.

Parameters
atA vec3 indicating where the Listener should look at.
upA vec3 indicating the up direction for the Listener.

◆ setListenerPitch()

static void OficinaFramework::AudioSystem::setListenerPitch ( ALuint  val)
static

Set the Audio Listener's pitch.

Parameters
valUnsigned integer value that should be set.

◆ setListenerPosition()

static void OficinaFramework::AudioSystem::setListenerPosition ( vec3  val)
static

Set the Audio Listener's position.

Parameters
valvec3 containing the desired position; prefer normalized.

◆ setListenerVelocity()

static void OficinaFramework::AudioSystem::setListenerVelocity ( vec3  val)
static

Set the Audio Listener's velocity.

Parameters
valvec3 containing the desired velocity; prefer normalized.

◆ setMute()

static void OficinaFramework::AudioSystem::setMute ( bool  val)
static

Sets the Mute flag for AudioSystem.

Parameters
valWhether sound should be mute or not.

◆ update()

static void OficinaFramework::AudioSystem::update ( )
static

Updates the AudioSystem.

Warning
Do not call this if you're using audio multithreading.

Friends And Related Function Documentation

◆ EngineCore

friend class EngineCore
friend

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