18 #ifndef ZENI_SOUND_SOURCE_HXX
19 #define ZENI_SOUND_SOURCE_HXX
31 #define AL_SEC_OFFSET 0x1024
48 m_play_position = time;
float get_duration() const
Get the duration of the Sound_Buffer in seconds.
void set_buffer(const Sound_Buffer &buffer)
Set the Sound_Buffer to be played.
float get_rolloff() const
void stop()
Stop the Sound_Source. (Essentially the same as pause but resets the current time.)
Vector3f get_velocity() const
Get the velocity of the Sound_Buffer.
float get_pitch() const
Get the pitch.
float get_reference_distance() const
void set_buffer(const Sound_Buffer &buffer)
Set the Sound_Buffer to be played.
A Snapshot of the Timer_HQ.
float get_gain() const
Get the gain.
bool is_paused() const
Check to see if the Sound_Source is paused.
void set_time(const float &time)
Set the current position in the Sound_Buffer, offset in seconds.
void pause()
Pause the Sound_Source.
void update()
Update to current Time.
int get_priority() const
Get the Sound_Source's priority.
void stop()
Stop the Sound_Source_HW. (Essentially the same as pause but resets the current time.)
void set_rolloff(const float &rolloff=ZENI_DEFAULT_ROLLOFF)
Time_HQ get_unstop_time() const
Get the Time_HQ at which the Sound_Source was most recently played or unpaused.
void play()
Begin playing or unpause the Sound_Source_HW.
float get_max_distance() const
void set_gain(const float &gain=ZENI_DEFAULT_GAIN)
Set the gain.
void set_reference_distance(const float &reference_distance=ZENI_DEFAULT_REFERENCE_DISTANCE)
void play()
Begin playing or unpause the Sound_Source.
void set_looping(const bool &looping)
Set whether the Sound_Buffer should loop back to the start once it is done playing.
void set_velocity(const Vector3f &velocity)
Set the velocity of the Sound_Source_HW for the doppler effect.
A 3D Point represented with floats.
Point3f get_position() const
Get the position of the Sound_Buffer.
void set_max_distance(const float &max_distance=ZENI_DEFAULT_MAX_SOUND_DISTANCE)
const Sound_Buffer & get_buffer() const
Get the Sound_Buffer's OpenAL id.
EGLContext EGLenum EGLClientBuffer buffer
A Featureful 3-Space Vector Class.
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.
void set_max_distance(const float &max_distance=ZENI_DEFAULT_MAX_SOUND_DISTANCE)
void set_priority(const int &priority=ZENI_DEFAULT_SOUND_PRIORITY)
Set the priority that this Sound_Source should have. Higher numbers are more likely to be selected fo...
void set_reference_distance(const float &reference_distance=ZENI_DEFAULT_REFERENCE_DISTANCE)
float get_duration() const
Get the duration of the Sound_Buffer in seconds.
void set_looping(const bool &looping)
Set whether the Sound_Buffer should loop back to the start once it is done playing.
void set_gain(const float &gain=ZENI_DEFAULT_GAIN)
Set the gain.
bool is_stopped() const
Check to see if the Sound_Source is stopped.
bool is_playing() const
Check to see if the Sound_Source is playing.
void set_position(const Point3f &position)
Set the position of the Sound_Source_HW.
void set_pitch(const float &pitch=ZENI_DEFAULT_PITCH)
Set the pitch.
void set_velocity(const Vector3f &velocity)
Set the velocity of the Sound_Source for the doppler effect.
void set_position(const Point3f &position)
Set the position of the Sound_Source.
void pause()
Pause the Sound_Source_HW.
bool is_assigned() const
Check to see if the Sound_Source is assigned to actual hardware.
bool is_looping() const
Check to see if the Sound_Buffer is set to loop back to the start once it is done playing...
void set_pitch(const float &pitch=ZENI_DEFAULT_PITCH)
Set the pitch.