240 [[nodiscard]]
void* getSound()
const override;
246 const std::unique_ptr<Impl> m_impl;
#define SFML_AUDIO_API
Definition Export.hpp:42
Storage for audio samples defining a sound.
Definition SoundBuffer.hpp:55
Status getStatus() const override
Get the current status of the sound (stopped, paused, playing).
void pause() override
Pause the sound.
~Sound() override
Destructor.
void setLooping(bool loop)
Set whether or not the sound should loop after reaching the end.
Sound(const SoundBuffer &buffer)
Construct the sound with a buffer.
Sound(const SoundBuffer &&buffer)=delete
Disallow construction from a temporary sound buffer.
bool isLooping() const
Tell whether or not the sound is in loop mode.
friend class SoundBuffer
Definition Sound.hpp:223
Time getPlayingOffset() const
Get the current playing position of the sound.
void setBuffer(const SoundBuffer &buffer)
Set the source buffer containing the audio data to play.
Sound & operator=(const Sound &right)
Overload of assignment operator.
void stop() override
stop playing the sound
void play() override
Start or resume playing the sound.
void setBuffer(const SoundBuffer &&buffer)=delete
Disallow setting from a temporary sound buffer.
const SoundBuffer & getBuffer() const
Get the audio buffer attached to the sound.
void setPlayingOffset(Time timeOffset)
Change the current playing position of the sound.
void setEffectProcessor(EffectProcessor effectProcessor) override
Set the effect processor to be applied to the sound.
Sound(const Sound ©)
Copy constructor.
SoundSource(const SoundSource &)=default
Copy constructor.
Status
Enumeration of the sound source states.
Definition SoundSource.hpp:55
std::function< void(const float *inputFrames, unsigned int &inputFrameCount, float *outputFrames, unsigned int &outputFrameCount, unsigned int frameChannelCount)> EffectProcessor
Callable that is provided with sound data for processing.
Definition SoundSource.hpp:154
Represents a time value.
Definition Time.hpp:42
Definition BlendMode.hpp:34