12namespace sound {
struct ALExtensions; }
29 std::shared_ptr<ISoundDataOpen>
m_data;
37 PlayingSound(ALuint source_id, std::shared_ptr<ISoundDataOpen> data,
bool loop,
38 f32 volume, f32 pitch, f32 start_time,
39 const std::optional<std::pair<v3f, v3f>> &pos_vel_opt,
50 bool stepStream(
bool playback_speed_changed =
false);
53 bool fade(f32 step, f32 target_gain)
noexcept;
56 bool doFade(f32 dtime)
noexcept;
60 void setGain(f32 gain)
noexcept;
#define DISABLE_CLASS_COPY(C)
Definition basic_macros.h:26
A sound that is currently played.
Definition playing_sound.h:22
ALint getState() noexcept
Definition playing_sound.h:71
void resume() noexcept
Definition playing_sound.h:90
void play() noexcept
Definition playing_sound.h:68
bool isDead() noexcept
Definition playing_sound.h:78
std::optional< FadeState > m_fade_state
Definition playing_sound.h:34
~PlayingSound() noexcept
Definition playing_sound.h:42
bool m_is_positional
Definition playing_sound.h:32
bool isStreaming() const noexcept
Definition playing_sound.h:66
ALuint m_next_sample_pos
Definition playing_sound.h:30
void updatePosVel(const v3f &pos, const v3f &vel) noexcept
Definition playing_sound.cpp:226
bool stepStream(bool playback_speed_changed=false)
Definition playing_sound.cpp:111
bool fade(f32 step, f32 target_gain) noexcept
Definition playing_sound.cpp:176
bool m_looping
Definition playing_sound.h:31
bool doFade(f32 dtime) noexcept
Definition playing_sound.cpp:188
bool m_stopped_means_dead
Definition playing_sound.h:33
std::shared_ptr< ISoundDataOpen > m_data
Definition playing_sound.h:29
void setPitch(f32 pitch)
Definition playing_sound.cpp:259
PlayingSound(ALuint source_id, std::shared_ptr< ISoundDataOpen > data, bool loop, f32 volume, f32 pitch, f32 start_time, const std::optional< std::pair< v3f, v3f > > &pos_vel_opt, const ALExtensions &exts)
Definition playing_sound.cpp:19
void pause() noexcept
Definition playing_sound.h:84
f32 getGain() noexcept
Definition playing_sound.cpp:249
ALuint m_source_id
Definition playing_sound.h:28
void setGain(f32 gain) noexcept
Definition playing_sound.cpp:239
core::vector3df v3f
Definition irr_v3d.h:11
Definition al_extensions.cpp:11
Struct for AL and ALC extensions.
Definition al_extensions.h:15
Definition playing_sound.h:23
f32 step
Definition playing_sound.h:24
f32 target_gain
Definition playing_sound.h:25