18 #ifndef ZENI_SOUND_HXX
19 #define ZENI_SOUND_HXX
31 return *m_sound_renderer;
35 return m_listener_gain;
39 return m_listener_muted;
44 get_BGM_Source().set_pitch(pitch);
46 init_BGM_Sound_Stream_AL();
54 get_BGM_Source().set_gain(gain);
56 init_BGM_Sound_Stream_AL();
64 get_BGM_Source().set_looping(looping);
66 init_BGM_Sound_Stream_AL();
74 get_BGM_Source().set_time(time);
76 init_BGM_Sound_Stream_AL();
84 init_BGM_Sound_Stream_AL();
92 return get_BGM_Source().get_pitch();
94 init_BGM_Sound_Stream_AL();
101 return get_BGM_Source().get_gain();
103 init_BGM_Sound_Stream_AL();
110 return get_BGM_Source().is_looping();
112 init_BGM_Sound_Stream_AL();
119 return get_BGM_Source().get_time();
121 init_BGM_Sound_Stream_AL();
122 return m_bgm ? m_bgm->
get_time() : 0.0f;
128 return get_BGM_Source().is_playing();
130 init_BGM_Sound_Stream_AL();
137 return get_BGM_Source().is_paused();
139 init_BGM_Sound_Stream_AL();
140 return m_bgm ? m_bgm->
is_paused() :
false;
146 return get_BGM_Source().is_stopped();
148 init_BGM_Sound_Stream_AL();
155 get_BGM_Source().play();
157 init_BGM_Sound_Stream_AL();
165 get_BGM_Source().pause();
167 init_BGM_Sound_Stream_AL();
175 get_BGM_Source().stop();
177 init_BGM_Sound_Stream_AL();
float get_BGM_gain()
Get the gain.
void stop_BGM()
Stop BackGround Music.
float get_BGM_time()
Get the current position in the BGM, offset in seconds.
float get_BGM_pitch()
Get the pitch.
#define ZENI_DEFAULT_PITCH
Sound_Renderer & get_Renderer()
Get the current Sound_Renderer.
float get_gain() const
Get the gain.
bool stopped_BGM()
Check to see if BackGround Music is stopped.
#define ZENI_DEFAULT_GAIN
float get_pitch() const
Get the pitch.
bool is_BGM_looping()
Check to see if the BGM is set to loop back to the start once it is done playing. ...
void set_time(const float &time)
Set the current position in the Sound_Buffer, offset in seconds.
void pause()
Pause the Sound_Source.
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 play_BGM()
Begin Playing BackGround Music.
void set_BGM_time(const float &time)
Set the current position in the BGM, offset in seconds.
void set_gain(const float &gain=ZENI_DEFAULT_GAIN)
Set the gain.
float get_time() const
Get the current position in the Sound_Buffer, offset in seconds.
void stop()
Stop the Sound_Source. (Essentially the same as pause but resets the current time.)
bool playing_BGM()
Check to see if BackGround Music is playing.
void set_BGM_pitch(const float &pitch)
Set the pitch.
void set_BGM_looping(const bool &looping)
Set whether the BGM should loop back to the start once it is done playing.
void play()
Begin playing or unpause the Sound_Source.
bool is_listener_muted() const
Is the listener muted.
bool is_playing() const
Check to see if the Sound_Source is playing.
void pause_BGM()
Pause BackGround Music.
bool is_stopped() const
Check to see if the Sound_Source is stopped.
bool is_paused() const
Check to see if the Sound_Source is paused.
void set_looping(const bool &looping)
Set whether the Sound_Buffer should loop back to the start once it is done playing.
void set_pitch(const float &pitch=ZENI_DEFAULT_PITCH)
Set the pitch.
void update()
Update background music, as needed.
bool paused_BGM()
Check to see if BackGround Music is paused.
float get_listener_gain() const
Get the listener gain.
void set_BGM_gain(const float &gain)
Set the gain.