Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
Nz::Audio Class Reference

Audio class that represents the module initializer of Audio. More...

Static Public Member Functions

static AudioFormat GetAudioFormat (unsigned int channelCount)
 Gets the format of the audio. More...
 
static float GetDopplerFactor ()
 Gets the factor of the doppler effect. More...
 
static float GetGlobalVolume ()
 Gets the global volume. More...
 
static Vector3f GetListenerDirection ()
 Gets the direction of the listener. More...
 
static Vector3f GetListenerPosition ()
 Gets the position of the listener. More...
 
static Quaternionf GetListenerRotation ()
 Gets the rotation of the listener. More...
 
static Vector3f GetListenerVelocity ()
 Gets the velocity of the listener. More...
 
static float GetSpeedOfSound ()
 Gets the speed of sound. More...
 
static bool Initialize ()
 Initializes the Audio module. More...
 
static bool IsFormatSupported (AudioFormat format)
 Checks whether the format is supported by the engine. More...
 
static bool IsInitialized ()
 Checks whether the module is initialized. More...
 
static void SetDopplerFactor (float dopplerFactor)
 Sets the factor of the doppler effect. More...
 
static void SetGlobalVolume (float volume)
 Sets the global volume. More...
 
static void SetListenerDirection (const Vector3f &direction)
 Sets the direction of the listener. More...
 
static void SetListenerDirection (float dirX, float dirY, float dirZ)
 Sets the direction of the listener. More...
 
static void SetListenerPosition (const Vector3f &position)
 Sets the position of the listener. More...
 
static void SetListenerPosition (float x, float y, float z)
 Sets the position of the listener. More...
 
static void SetListenerRotation (const Quaternionf &rotation)
 Sets the rotation of the listener. More...
 
static void SetListenerVelocity (const Vector3f &velocity)
 Sets the velocity of the listener. More...
 
static void SetListenerVelocity (float velX, float velY, float velZ)
 Sets the velocity of the listener. More...
 
static void SetSpeedOfSound (float speed)
 Sets the speed of sound. More...
 
static void Uninitialize ()
 Uninitializes the Audio module. More...
 

Detailed Description

Audio class that represents the module initializer of Audio.

Member Function Documentation

◆ GetAudioFormat()

AudioFormat Nz::Audio::GetAudioFormat ( unsigned int  channelCount)
static

Gets the format of the audio.

Returns
AudioFormat Enumeration type for the format
Parameters
channelCountNumber of channels
Remarks
Produces a NazaraError if the number of channels is erroneous (3 or 5) and AudioFormat_Unknown is returned

◆ GetDopplerFactor()

float Nz::Audio::GetDopplerFactor ( )
static

Gets the factor of the doppler effect.

Returns
Global factor of the doppler effect

◆ GetGlobalVolume()

float Nz::Audio::GetGlobalVolume ( )
static

Gets the global volume.

Returns
Float between [0, inf) with 100.f being the default

◆ GetListenerDirection()

Vector3f Nz::Audio::GetListenerDirection ( )
static

Gets the direction of the listener.

Returns
Direction of the listener, in front of the listener
See also
GetListenerRotation

◆ GetListenerPosition()

Vector3f Nz::Audio::GetListenerPosition ( )
static

Gets the position of the listener.

Returns
Position of the listener
See also
GetListenerVelocity

◆ GetListenerRotation()

Quaternionf Nz::Audio::GetListenerRotation ( )
static

Gets the rotation of the listener.

Returns
Rotation of the listener

◆ GetListenerVelocity()

Vector3f Nz::Audio::GetListenerVelocity ( )
static

Gets the velocity of the listener.

Returns
Velocity of the listener
See also
GetListenerPosition

◆ GetSpeedOfSound()

float Nz::Audio::GetSpeedOfSound ( )
static

Gets the speed of sound.

Returns
Speed of sound

◆ Initialize()

bool Nz::Audio::Initialize ( )
static

Initializes the Audio module.

Returns
true if initialization is successful
Remarks
Produces a NazaraError if initialization of modules Core, OpenAL or SoundBuffer failed
Produces a NazaraNotice

◆ IsFormatSupported()

bool Nz::Audio::IsFormatSupported ( AudioFormat  format)
static

Checks whether the format is supported by the engine.

Returns
true if it is the case
Parameters
formatFormat to check

◆ IsInitialized()

bool Nz::Audio::IsInitialized ( )
static

Checks whether the module is initialized.

Returns
true if module is initialized

◆ SetDopplerFactor()

void Nz::Audio::SetDopplerFactor ( float  dopplerFactor)
static

Sets the factor of the doppler effect.

Parameters
dopplerFactorGlobal factor of the doppler effect

◆ SetGlobalVolume()

void Nz::Audio::SetGlobalVolume ( float  volume)
static

Sets the global volume.

Parameters
volumeFloat between [0, inf) with 100.f being the default

◆ SetListenerDirection() [1/2]

void Nz::Audio::SetListenerDirection ( const Vector3f direction)
static

Sets the direction of the listener.

Parameters
directionDirection of the listener, in front of the listener
See also
SetListenerDirection, SetListenerRotation

◆ SetListenerDirection() [2/2]

void Nz::Audio::SetListenerDirection ( float  dirX,
float  dirY,
float  dirZ 
)
static

Sets the direction of the listener.

Parameters
(dirX,dirY,dirZ)Direction of the listener, in front of the listener
See also
SetListenerDirection, SetListenerRotation

◆ SetListenerPosition() [1/2]

void Nz::Audio::SetListenerPosition ( const Vector3f position)
static

Sets the position of the listener.

Parameters
positionPosition of the listener
See also
SetListenerVelocity

◆ SetListenerPosition() [2/2]

void Nz::Audio::SetListenerPosition ( float  x,
float  y,
float  z 
)
static

Sets the position of the listener.

Parameters
(x,y,z)Position of the listener
See also
SetListenerVelocity

◆ SetListenerRotation()

void Nz::Audio::SetListenerRotation ( const Quaternionf rotation)
static

Sets the rotation of the listener.

Parameters
rotationRotation of the listener

◆ SetListenerVelocity() [1/2]

void Nz::Audio::SetListenerVelocity ( const Vector3f velocity)
static

Sets the velocity of the listener.

Parameters
velocityVelocity of the listener
See also
SetListenerPosition

◆ SetListenerVelocity() [2/2]

void Nz::Audio::SetListenerVelocity ( float  velX,
float  velY,
float  velZ 
)
static

Sets the velocity of the listener.

Parameters
(velX,velY,velZ)Velocity of the listener
See also
SetListenerPosition

◆ SetSpeedOfSound()

void Nz::Audio::SetSpeedOfSound ( float  speed)
static

Sets the speed of sound.

Parameters
speedSpeed of sound

◆ Uninitialize()

void Nz::Audio::Uninitialize ( )
static

Uninitializes the Audio module.

Remarks
Produces a NazaraNotice

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