zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Zeni::Sound_Stream_AL Class Reference

#include <Sound_Stream_AL.h>

Public Member Functions

 Sound_Stream_AL (const String &path, const bool &looping_=false, const float &time_=0.0f)
 
 ~Sound_Stream_AL ()
 
float get_duration () const
 Get the duration of the Sound_Buffer in seconds. More...
 
float get_gain () const
 Get the gain. More...
 
float get_max_distance () const
 
float get_pitch () const
 Get the pitch. More...
 
Point3f get_position () const
 Get the position of the Sound_Buffer. More...
 
float get_reference_distance () const
 
float get_rolloff () const
 
float get_time () const
 Get the current position in the Sound_Buffer, offset in seconds. More...
 
Vector3f get_velocity () const
 Get the velocity of the Sound_Buffer. More...
 
bool is_looping () const
 Check to see if the Sound_Buffer is set to loop back to the start once it is done playing. More...
 
bool is_paused () const
 Check to see if the Sound_Source is paused. More...
 
bool is_playing () const
 Check to see if the Sound_Source is playing. More...
 
bool is_stopped () const
 Check to see if the Sound_Source is stopped. More...
 
void pause ()
 Pause the Sound_Source. More...
 
void play ()
 Begin playing or unpause the Sound_Source. More...
 
void set_gain (const float &gain=ZENI_DEFAULT_GAIN)
 Set the gain. More...
 
void set_looping (const bool &looping)
 Set whether the Sound_Buffer should loop back to the start once it is done playing. More...
 
void set_max_distance (const float &max_distance=ZENI_DEFAULT_MAX_SOUND_DISTANCE)
 
void set_pitch (const float &pitch=ZENI_DEFAULT_PITCH)
 Set the pitch. More...
 
void set_position (const Point3f &position)
 Set the position of the Sound_Source_HW. More...
 
void set_reference_distance (const float &reference_distance=ZENI_DEFAULT_REFERENCE_DISTANCE)
 
void set_rolloff (const float &rolloff=ZENI_DEFAULT_ROLLOFF)
 
void set_time (const float &time)
 Set the current position in the Sound_Buffer, offset in seconds. More...
 
void set_velocity (const Vector3f &velocity)
 Set the velocity of the Sound_Source_HW for the doppler effect. More...
 
void stop ()
 Stop the Sound_Source. (Essentially the same as pause but resets the current time.) More...
 
void update ()
 

Detailed Description

Definition at line 12 of file Sound_Stream_AL.h.

Constructor & Destructor Documentation

Zeni::Sound_Stream_AL::~Sound_Stream_AL ( )

Definition at line 50 of file Sound_Stream_AL.cpp.

Member Function Documentation

float Zeni::Sound_Stream_AL::get_duration ( ) const

Get the duration of the Sound_Buffer in seconds.

Definition at line 92 of file Sound_Stream_AL.cpp.

References ov_time_total().

float Zeni::Sound_Stream_AL::get_gain ( ) const
float Zeni::Sound_Stream_AL::get_max_distance ( ) const
float Zeni::Sound_Stream_AL::get_pitch ( ) const
Point3f Zeni::Sound_Stream_AL::get_position ( ) const

Get the position of the Sound_Buffer.

Definition at line 110 of file Sound_Stream_AL.cpp.

References AL_POSITION, and Zeni::Sound_Renderer_AL::alGetSourcefv().

Referenced by Zeni::Sound::get_listener_position(), and Zeni::Sound::set_BGM().

float Zeni::Sound_Stream_AL::get_reference_distance ( ) const
float Zeni::Sound_Stream_AL::get_rolloff ( ) const
float Zeni::Sound_Stream_AL::get_time ( ) const

Get the current position in the Sound_Buffer, offset in seconds.

Definition at line 126 of file Sound_Stream_AL.cpp.

References ov_time_tell().

Referenced by Zeni::Sound::get_BGM_time().

Vector3f Zeni::Sound_Stream_AL::get_velocity ( ) const

Get the velocity of the Sound_Buffer.

Definition at line 116 of file Sound_Stream_AL.cpp.

References AL_VELOCITY, and Zeni::Sound_Renderer_AL::alGetSourcefv().

Referenced by Zeni::Sound::get_listener_velocity(), and Zeni::Sound::set_BGM().

bool Zeni::Sound_Stream_AL::is_looping ( ) const

Check to see if the Sound_Buffer is set to loop back to the start once it is done playing.

Definition at line 122 of file Sound_Stream_AL.cpp.

Referenced by Zeni::Sound::is_BGM_looping(), and Zeni::Sound::set_BGM().

bool Zeni::Sound_Stream_AL::is_paused ( ) const

Check to see if the Sound_Source is paused.

Definition at line 171 of file Sound_Stream_AL.cpp.

References AL_PAUSED, AL_SOURCE_STATE, and Zeni::Sound_Renderer_AL::alGetSourcei().

Referenced by Zeni::Sound::paused_BGM().

bool Zeni::Sound_Stream_AL::is_playing ( ) const

Check to see if the Sound_Source is playing.

Definition at line 165 of file Sound_Stream_AL.cpp.

References AL_PLAYING, AL_SOURCE_STATE, and Zeni::Sound_Renderer_AL::alGetSourcei().

Referenced by Zeni::Sound::playing_BGM(), and Zeni::Sound::set_BGM().

bool Zeni::Sound_Stream_AL::is_stopped ( ) const

Check to see if the Sound_Source is stopped.

Definition at line 177 of file Sound_Stream_AL.cpp.

References AL_SOURCE_STATE, AL_STOPPED, and Zeni::Sound_Renderer_AL::alGetSourcei().

Referenced by Zeni::Sound::stopped_BGM().

void Zeni::Sound_Stream_AL::pause ( )

Pause the Sound_Source.

Definition at line 157 of file Sound_Stream_AL.cpp.

References Zeni::Sound_Renderer_AL::alSourcePause().

Referenced by Zeni::Sound::pause_BGM().

void Zeni::Sound_Stream_AL::play ( )
void Zeni::Sound_Stream_AL::set_gain ( const float &  gain = ZENI_DEFAULT_GAIN)

Set the gain.

Definition at line 58 of file Sound_Stream_AL.cpp.

References AL_GAIN, Zeni::Sound_Renderer_AL::alSourcef(), and Zeni::get_Sound().

Referenced by Zeni::Sound::set_BGM(), and Zeni::Sound::set_BGM_gain().

void Zeni::Sound_Stream_AL::set_looping ( const bool &  looping)

Set whether the Sound_Buffer should loop back to the start once it is done playing.

Definition at line 71 of file Sound_Stream_AL.cpp.

Referenced by Zeni::Sound::set_BGM_looping().

void Zeni::Sound_Stream_AL::set_max_distance ( const float &  max_distance = ZENI_DEFAULT_MAX_SOUND_DISTANCE)

Definition at line 84 of file Sound_Stream_AL.cpp.

References AL_MAX_DISTANCE, and Zeni::Sound_Renderer_AL::alSourcef().

Referenced by Zeni::Sound::set_BGM().

void Zeni::Sound_Stream_AL::set_pitch ( const float &  pitch = ZENI_DEFAULT_PITCH)

Set the pitch.

Definition at line 54 of file Sound_Stream_AL.cpp.

References AL_PITCH, and Zeni::Sound_Renderer_AL::alSourcef().

Referenced by Zeni::Sound::set_BGM(), and Zeni::Sound::set_BGM_pitch().

void Zeni::Sound_Stream_AL::set_position ( const Point3f position)

Set the position of the Sound_Source_HW.

Definition at line 63 of file Sound_Stream_AL.cpp.

References AL_POSITION, and Zeni::Sound_Renderer_AL::alSourcefv().

Referenced by Zeni::Sound::set_BGM(), and Zeni::Sound::set_listener_position().

void Zeni::Sound_Stream_AL::set_reference_distance ( const float &  reference_distance = ZENI_DEFAULT_REFERENCE_DISTANCE)
void Zeni::Sound_Stream_AL::set_rolloff ( const float &  rolloff = ZENI_DEFAULT_ROLLOFF)

Definition at line 88 of file Sound_Stream_AL.cpp.

References AL_ROLLOFF_FACTOR, and Zeni::Sound_Renderer_AL::alSourcef().

Referenced by Zeni::Sound::set_BGM().

void Zeni::Sound_Stream_AL::set_time ( const float &  time)

Set the current position in the Sound_Buffer, offset in seconds.

Definition at line 75 of file Sound_Stream_AL.cpp.

References Zeni::get_Sound(), and ov_time_seek().

Referenced by Zeni::Sound::set_BGM_time().

void Zeni::Sound_Stream_AL::set_velocity ( const Vector3f velocity)

Set the velocity of the Sound_Source_HW for the doppler effect.

Definition at line 67 of file Sound_Stream_AL.cpp.

References AL_VELOCITY, and Zeni::Sound_Renderer_AL::alSourcefv().

Referenced by Zeni::Sound::set_BGM(), and Zeni::Sound::set_listener_velocity().

void Zeni::Sound_Stream_AL::stop ( )

Stop the Sound_Source. (Essentially the same as pause but resets the current time.)

Definition at line 161 of file Sound_Stream_AL.cpp.

References Zeni::Sound_Renderer_AL::alSourceStop().

Referenced by Zeni::Sound::stop_BGM().


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