QSound Class Reference |
Platform | Audio Facility |
---|---|
Microsoft Windows | The underlying multimedia system is used; only WAVE format sound files are supported. |
X11 | The Network Audio System is used if available, otherwise all operations work silently. NAS supports WAVE and AU files. |
Mac OS X | QuickTime is used. All QuickTime formats are supported by Qt/Mac. |
Qtopia Core | A built-in mixing sound server is used, accessing /dev/dsp directly. Only the WAVE format is supported. |
Note that QSound does not support resources. This might be fixed in a future Qt version.
Constructs a QSound object from the file specified by the given filename and with the given parent.
This may use more memory than the static play() function, but it may also play more immediately (depending on the underlying platform audio facilities).
See also play().
Destroys this sound object. If the sound is not finished playing, the stop() function is called before the sound object is destructed.
See also stop() and isFinished().
Returns the filename associated with this QSound object.
See also QSound().
Returns true if sound facilities exist on the platform; otherwise returns false.
If no sound is available, all QSound operations work silently and quickly. An application may choose either to notify the user if sound is crucial to the application or to operate silently without bothering the user.
Note: On Windows this always returns true because some sound card drivers do not implement a way to find out whether it is available or not.
Returns true if the sound has finished playing; otherwise returns false.
Warning: On Windows this function always returns true for unlooped sounds.
Returns the number of times the sound will play.
See also loopsRemaining() and setLoops().
Returns the remaining number of times the sound will loop (this value decreases each time the sound is played).
See also loops() and isFinished().
Plays the sound stored in the file specified by the given filename.
See also stop(), loopsRemaining(), and isFinished().
This is an overloaded member function, provided for convenience.
Starts playing the sound specified by this QSound object.
The function returns immediately. Depending on the platform audio facilities, other sounds may stop or be mixed with the new sound. The sound can be played again at any time, possibly mixing or replacing previous plays of the sound.
See also filename().
Sets the sound to repeat the given number of times when it is played.
Note that passing the value -1 will cause the sound to loop indefinitely.
See also loops().
Stops the sound playing.
Note that on Windows the current loop will finish if a sound is played in a loop.
See also play().
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.1 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com