17 #ifndef SOUNDEFFECTINSTANCE_H
18 #define SOUNDEFFECTINSTANCE_H
20 #include <QSharedPointer>
136 void stopIfNecessary(
bool isStopped);
152 bool mLooped =
false;
153 float mVolume = 1.0f;
156 bool mPlayingLooped =
false;
159 #endif // SOUNDEFFECTINSTANCE_H
An instance of a sound effect.
Definition: SoundEffectInstance.h:36
bool isPlaying() const
Returns whether or not this sample is currently playing.
void play()
Starts playing this instance of the sound effect.
void setLooped(bool value)
Sets property to play looped or as a one-shot sound effect.
void reset()
Releases the reference to the shared QSoundEffect, stopping it if necessary.
SoundEffectInstance & operator=(SoundEffectInstance &&other)
Move assigns other to this SoundEffectInstance instance.
SoundEffectInstance()
Create a SoundEffectInstance referencing nothing.
void stop()
Stops the sample if it is currently playing.
void setVolume(float value)
Sets play volume property.
void swap(SoundEffectInstance &other)
Swaps QSoundEffect references and parameters with another SoundEffectInstance.