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

Public Types | |
| enum | ReplayMode { normal = 0, looping = 1, hit = 2 } |
| enum | LifetimeMode { removeNone = 0, removeInstance = 1, removeGroup = 2 } |
Public Member Functions | |
| SoundInstance () | |
| SoundInstance (const char *name) | |
| Sound | sound () const |
| bool | multiChannel () const |
| bool | playing () const |
| float | volume () const |
| AudioEffect | effectOverride () const |
| Utils::Result | setMultiChannel (bool) |
| Utils::Result | setVolume (float) |
| Utils::Result | setEffectOverride (const AudioEffect &) |
| Utils::Result | play (unsigned int sampleIndex=0, ReplayMode replay=normal, LifetimeMode life=removeNone) |
| Utils::Result | stop () |
Static Public Member Functions | |
| SoundInstance | create (const char *name, const Sound &sound, const Group &group, const Database &db=Database()) |
| SoundInstance | find (const char *name) |
| ClassType | classType () |
| SoundInstance | cast (const ObjectBase &) |
The SoundInstance is used to bind a sound to the scene graph, and to play those sounds. A SoundInstance object has a default volume of 0.0f.
|
|
This enumeration defines options to be passed to the play() method that indicate what should happen when the sound finishes playing, or when stop() is called.
|
|
|
This enumerated type defines options to be passed to the play() method that indicate how the sound is to be moved/replayed.
|
|
|
Create a null sound instance reference. |
|
|
Search the currently attached databases for a sound instance with the given name. |
|
|
If the object referenced by
Reimplemented from Q::Instance. |
|
|
Return the type for this class. Reimplemented from Q::Instance. |
|
||||||||||||||||||||
|
Create a new sound instance named |
|
|
The effect override of this sound. This effect overrides any other AudioEffect objects that may affect this sound (Microphone, Environment, Sound). |
|
|
Search the currently attached databases for a sound instance with the given name and return that object, if it exists. Reimplemented from Q::Instance. |
|
|
Return whether the sound instance is multi channel or single channel. A single channel sound instance will play only one sound at a time, i.e. calling SoundInstance::play again will cause the previous sound to stop. In a multi channel sound instance, calling SoundInstance::play twice will cause two sounds to be played simultaneously. The default for new sound instances is single channel. |
|
||||||||||||||||
|
Play a sample. In single channel mode, this will stop any sound that is currently playing. In multi channel mode, it will play on top of previous sounds.
The
The
|
|
|
Checks whether the instance is playing. In multi channel mode, this method returns true if and only if at least one sound is playing.
|
|
|
Set the effect of this sound. This effect overrides any other AudioEffect objects that may affect this sound (Microphone, Environment, Sound). |
|
|
Set whether the sound instance is multi channel or single channel. |
|
|
Set the volume of the sound instance. In multi channel mode, this sets the volume of all playing sounds. Volume is represented as an attenuation in decibels (dBFS). |
|
|
Return the Sound associated with this instance. |
|
|
Stop all playing samples. In multi channel mode, this stops all the sounds at once. |
|
|
Returns the volume of the instance. In multi channel mode, this will set the volume of all the playing samples. Volume is represented as an attenuation in decibels (dBFS). |
|
|
|
Qube Software Limited © 2000-2004
|
|