Aether3D
Game Engine
Public Member Functions | List of all members
Audio Class Referenceabstract

Handles audio. More...

#include <Audio.hpp>

Public Member Functions

virtual ~Audio ()
 Destructor.
 
virtual void AddSound (const char *soundName, const char *soundFile)=0
 Adds a sound. It can be played back using Play(). More...
 
virtual void Play (const char *soundName)=0
 Plays a sound. It must have been added before using addSound(). More...
 
virtual bool IsMuted () const =0
 Mute status. Default: unmuted. More...
 
virtual void SetDopplerFactor (float factor)=0
 Sets Doppler factor. More...
 
virtual void SetDopplerVelocity (float velocity)=0
 Sets Doppler velocity. More...
 
virtual void SetGain (float gain)=0
 Sets gain. More...
 
virtual void SetMute (bool mute)=0
 Sets muting on/off. Defaults to unmuted. More...
 

Detailed Description

Handles audio.

Member Function Documentation

◆ AddSound()

virtual void Audio::AddSound ( const char *  soundName,
const char *  soundFile 
)
pure virtual

Adds a sound. It can be played back using Play().

Parameters
soundNameSound's name.
soundFileSound's file name. Format can be .wav or .ogg (vorbis).
See also
Play()

◆ IsMuted()

virtual bool Audio::IsMuted ( ) const
pure virtual

Mute status. Default: unmuted.

Returns
True, if the audio is muted, false otherwise.

◆ Play()

virtual void Audio::Play ( const char *  soundName)
pure virtual

Plays a sound. It must have been added before using addSound().

Parameters
soundNameSound name.

◆ SetDopplerFactor()

virtual void Audio::SetDopplerFactor ( float  factor)
pure virtual

Sets Doppler factor.

Parameters
factorFactor. Defaults to 1.

◆ SetDopplerVelocity()

virtual void Audio::SetDopplerVelocity ( float  velocity)
pure virtual

Sets Doppler velocity.

Parameters
velocityVelocity in m/s. Defaults to 343.

◆ SetGain()

virtual void Audio::SetGain ( float  gain)
pure virtual

Sets gain.

Parameters
gainGain. Defaults to 1. 0 means muted.

◆ SetMute()

virtual void Audio::SetMute ( bool  mute)
pure virtual

Sets muting on/off. Defaults to unmuted.

Parameters
muteTrue, if the audio will be muted.

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