47 #include <private/qobject_p.h> 65 if (servers->
count() == 0) {
82 return *servers->
first();
89 : filename(fname),
bucket(0), looprem(0), looptotal(1)
239 return d->looprem == 0;
260 d->looprem =
d->looptotal;
358 delete s->d_func()->bucket;
359 s->d_func()->bucket = b;
367 return s->d_func()->bucket;
376 if (s->d_func()->looprem > 0)
377 --s->d_func()->looprem;
378 return s->d_func()->looprem;
402 #endif // QT_NO_SOUND
QAuBucket * bucket(QSound *)
Returns the internal bucket record of sound s.
#define QT_END_NAMESPACE
This macro expands to.
static QString fromAscii(const char *, int size=-1)
Returns a QString initialized with the first size characters from the string str. ...
bool isFinished() const
Returns true if the sound has finished playing; otherwise returns false.
void setLoops(int)
Sets the sound to repeat the given number of times when it is played.
int count(const T &t) const
Returns the number of occurrences of value in the list.
The QString class provides a Unicode character string.
virtual void play(const QString &filename)
int decLoop(QSound *)
Decrements the QSound::loopRemaining() value for sound s, returning the result.
The QObject class is the base class of all Qt objects.
~QSound()
Destroys this sound object.
int loopsRemaining() const
Returns the remaining number of times the sound will loop (this value decreases each time the sound i...
static bool isAvailable()
Returns true if sound facilities exist on the platform; otherwise returns false.
void setObjectName(const QString &name)
#define QT_BEGIN_NAMESPACE
This macro expands to.
static QList< QAuServer * > * servers
QSound(const QString &filename, QObject *parent=0)
Constructs a QSound object from the file specified by the given filename and with the given parent...
void play()
Starts playing the sound specified by this QSound object.
void setBucket(QSound *, QAuBucket *)
Sets the internal bucket record of sound s to b, deleting any previous setting.
void prepend(const T &t)
Inserts value at the beginning of the list.
QSoundPrivate(const QString &fname)
QAuServer * qt_new_audio_server()
T & first()
Returns a reference to the first item in the list.
QAuServer(QObject *parent)
static QAuServer & server()
virtual void init(QSound *)
Initializes the sound.
Q_INVOKABLE QObject(QObject *parent=0)
Constructs an object with parent object parent.
QObject * parent() const
Returns a pointer to the parent object.
virtual void stop(QSound *)=0
void stop()
Stops the sound playing.
QString fileName() const
Returns the filename associated with this QSound object.
The QSound class provides access to the platform audio facilities.
int loops() const
Returns the number of times the sound will play.
The QList class is a template class that provides lists.
int removeAll(const T &t)
Removes all occurrences of value in the list and returns the number of entries removed.