240 [[nodiscard]]
void* getSound()
const override;
246 const std::unique_ptr<Impl> m_impl;
Storage for audio samples defining a sound.
SoundSource(const SoundSource &)=default
Copy constructor.
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.
Status
Enumeration of the sound source states.
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.
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.