|
QSDK 1.1 Documentation |
#include <Q/q.h>
Inheritance diagram for Q::SimpleSound:

Public Member Functions | |
| SimpleSound () | |
| SimpleSound (const char *name) | |
| Sample | sample () const |
| float | volume () const |
| float | fadeIn () const |
| float | fadeOut () const |
| bool | playing () const |
| AudioEffect | audioEffect () const |
| Utils::Result | setVolume (float) |
| Utils::Result | setFade (float in, float out) |
| Utils::Result | setSample (const Sample &) |
| Utils::Result | setAudioEffect (const AudioEffect &) |
| Utils::Result | play (bool looping, bool remove=false) |
| Utils::Result | stop () |
| Utils::Result | getFilename (Q::Text *) const |
Static Public Member Functions | |
| SimpleSound | create (const char *name, const Database &db=Database()) |
| SimpleSound | createFromFile (const char *filename) |
| SimpleSound | find (const char *name) |
| ClassType | classType () |
| SimpleSound | cast (const ObjectBase &) |
A SimpleSound object represents a non-directional sound emitter. A SimpleSound object has a default volume of 0.0f, a default fade in of 0.0f and a default fade out of 0.0f
QDemo2 production guide for guidance on how to build and import sound files in Q files.
|
|
Create a null SimpleSound reference |
|
|
Search the currently attached databases for a simple sound with the given name. |
|
|
Return the effect of this sound. |
|
|
If the object referenced by
|
|
|
Return the type for this class. |
|
||||||||||||
|
Create a new simple sound named |
|
|
Create a lightweight simple sound whose audio source comes from a file with the specified |
|
|
Return the time taken to go from silence up to playback volume when the SimpleSound starts playing.
|
|
|
Return the time taken to go from playback volume to silence when SimpleSound::stop is called or when the playback reaches its end.
|
|
|
Search the currently attached databases for a SimpleSound with the given name and return that object, if it exists. |
|
|
If the SimpleSound was created by SimpleSound::createFromFile, the method returns Utils::Success and the parameter gets passed the value of the filename. Otherwise, the method returns Utils::Failure. |
|
||||||||||||
|
Start playing the sound. If
|
|
|
Query whether the sound is playing. |
|
|
Obtain the sample associated with this SimpleSound.
|
|
|
Set the effect of this sound. |
|
||||||||||||
|
Set the fading times (in and out). The parameter
|
|
|
Set the sample to use. |
|
|
Set the volume of the sound. The volume is represented as an attenuation in decibels (dBFS).
|
|
|
Stop the sound. |
|
|
Return the sound's volume (in dBFS). |
|
|
|
Qube Software Limited © 2000-2004
|
|