109 if (oldLoops !=
loops)
168 ep->removeStereoSound(
this);
173 ep->addStereoSound(
this);
188#include "moc_qambientsound.cpp"
QAtomicInteger< bool > m_autoPlay
void setAutoPlay(bool autoPlay)
QAmbientSound(QAudioEngine *engine)
Creates a stereo sound source for engine.
void pause()
Pauses sound playback.
void play()
Starts playing back the sound.
QAudioEngine * engine() const
Returns the engine associated with this sound.
int loops
Determines how many times the sound is played before the player stops.
float volume
Defines the volume of the sound.
bool autoPlay
Determines whether the sound should automatically start playing when a source gets specified.
void setSource(const QUrl &url)
QUrl source
The source file for the sound to be played.
void stop()
Stops sound playback and resets the current position and current loop count to 0.
void setVolume(float volume)
static QAudioEnginePrivate * get(QAudioEngine *engine)
T fetchAndStoreRelaxed(T newValue) noexcept
T loadRelaxed() const noexcept
Combined button and popup list for selecting options.
QUrl url("example.com")
[constructor-url-reference]