QSDK 1.1 Documentation
Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

Q::AudioEffect Struct Reference
[Audio]

Audio effect controller. More...

#include <Q/q.h>

Inheritance diagram for Q::AudioEffect:

Q::Object Q::ObjectBase List of all members.

Public Types

enum  effectType {
  noEffect = 0,
  pitchShift = 1,
  reverb = 3
}
enum  effectParameterType {
  pitch = 0,
  preset = 1
}
enum  reverbType {
  reverbGeneric = 0,
  reverbPaddedCell = 1,
  reverbRoom = 2,
  reverbBathroom = 3,
  reverbLivingRoom = 4,
  reverbStoneRoom = 5,
  reverbAuditorium = 6,
  reverbConcertHall = 7,
  reverbCave = 8,
  reverbArena = 9,
  reverbHangar = 10,
  reverbCarpetedHallway = 11,
  reverbHallway = 12,
  reverbStoneCorridor = 13,
  reverbAlley = 14,
  reverbForest = 15,
  reverbCity = 16,
  reverbMountains = 17,
  reverbQuarry = 18,
  reverbPlain = 19,
  reverbParkingLot = 20,
  reverbSewerPipe = 21,
  reverbUnderwater = 22
}

Public Member Functions

 AudioEffect ()
 AudioEffect (const char *name)
unsigned int effect () const
float floatEffectParameter (unsigned int param, unsigned int index) const
int intEffectParameter (unsigned int param, unsigned int index) const
Utils::Result setEffect (unsigned int)
Utils::Result setFloatEffectParameter (unsigned int param, unsigned int index, float value)
Utils::Result setIntEffectParameter (unsigned int param, unsigned int index, int value)

Static Public Member Functions

AudioEffect create (const char *name, const Database &db=Database())
AudioEffect find (const char *name)
ClassType classType ()
AudioEffect cast (const ObjectBase &obj)

Detailed Description

Audio effect controller.

An AudioEffect object modifies the way a sound is played back. It can affect a SimpleSound, a Sound, a SoundInstance, an Environment or a Microphone. An AudioEffect is a flexible structure that has a type and a set of properties (param/value) defined by that type. The order of priority that the effects take, from highest to lowest are as follows: SoundInstance, Sound, Microphone, Environment. So an AudioEffect set on a SoundInstance will override any other AudioEffect. Note that the AudioEffect in the Environment of the Zone of the Microphone is never considered, only that of the Zone of a SoundInstance. A set of standard types and standard properties are predefined. Platform-specific types and properties are defined in QAudioEffects.

Warning:
Only the parameters for the standard effect types pitchShift and reverb are stored in the Q Database. The parameters for platform-specific effects are not saved into the database.
See also:
Sound, SimpleSound, SoundInstance, Environment, Microphone.


Member Enumeration Documentation

enum Q::AudioEffect::effectParameterType
 

List of standard effect parameters.

See also:
setFloatEffectParameter

setIntEffectParameter

Enumeration values:
pitch  This parameter must be used for the pitchShift effect type. It expects a floating-point value (the frequency multiplier) and therefore must be set using setFloatEffectParameter.
preset  This parameter must be used for the reverb effect type. It expects an integer value (defined in reverbType) and therefore must be set using setIntEffectParameter.
Warning:
On the Xbox platform, the reverb preset type is a unique global value. Changing the reverb type on one Q::AudioEffect changes the unique global reverb type.

enum Q::AudioEffect::effectType
 

List of standard effects.

See also:
setEffect
Enumeration values:
noEffect  Concurrent (null) effect. No parameters.
pitchShift  Concurrent effect that modifies the frequency at which the sample is played back. Takes one (floating point) parameter: the frequency multiplier.
reverb  Singleton effect that applies a reverberation. Takes one (integer) parameter: the preset reverb number.
Warning:
On the Xbox platform, the reverb preset type is a unique global value. Changing the reverb type on one Q::AudioEffect changes the unique global reverb type.

enum Q::AudioEffect::reverbType
 

A list of presets that can be used for the 'reverb' effect.

Warning:
On the Xbox platform, the reverb preset type is a unique global value. Changing the reverb type on one Q::AudioEffect changes the unique global reverb type.
Enumeration values:
reverbGeneric  Predefined reverb.
reverbPaddedCell  Predefined reverb.
reverbRoom  Predefined reverb.
reverbBathroom  Predefined reverb.
reverbLivingRoom  Predefined reverb.
reverbStoneRoom  Predefined reverb.
reverbAuditorium  Predefined reverb.
reverbConcertHall  Predefined reverb.
reverbCave  Predefined reverb.
reverbArena  Predefined reverb.
reverbHangar  Predefined reverb.
reverbCarpetedHallway  Predefined reverb.
reverbHallway  Predefined reverb.
reverbStoneCorridor  Predefined reverb.
reverbAlley  Predefined reverb.
reverbForest  Predefined reverb.
reverbCity  Predefined reverb.
reverbMountains  Predefined reverb.
reverbQuarry  Predefined reverb.
reverbPlain  Predefined reverb.
reverbParkingLot  Predefined reverb.
reverbSewerPipe  Predefined reverb.
reverbUnderwater  Predefined reverb.


Constructor & Destructor Documentation

Q::AudioEffect::AudioEffect  )  [inline]
 

Create a null AudioEffect reference.

Q::AudioEffect::AudioEffect const char *  name  ) 
 

Search the currently attached databases for an audio effect with the given name.


Member Function Documentation

AudioEffect Q::AudioEffect::cast const ObjectBase obj  )  [static]
 

If the object referenced by obj is an audio effect, then return a suitable AudioEffect reference to the object.

Note:
Casting this object will cause it to be loaded from the database if it is not currently resident.

ClassType Q::AudioEffect::classType  )  [static]
 

Return the type for this class.

AudioEffect Q::AudioEffect::create const char *  name,
const Database db = Database()
[static]
 

Create a new audio effect named name in the database db (or the most recently attached read-write database if db is null).

unsigned int Q::AudioEffect::effect  )  const
 

The effect type used. Predefined effect types are available in effectType. Platform-specific types are defined in QAudioEffects.

AudioEffect Q::AudioEffect::find const char *  name  )  [static]
 

Search the currently attached databases for an audio effect with the given name and return that object, if it exists.

float Q::AudioEffect::floatEffectParameter unsigned int  param,
unsigned int  index
const
 

Return the value of the required effect parameter. Each effect type may have different parameters with different values to refine them. Predefined effect parameter types are available in effectParameterType. Platform-specific types are defined in QAudioEffects. The index parameter allows multiple occurences of the same parameter type.

int Q::AudioEffect::intEffectParameter unsigned int  param,
unsigned int  index
const
 

Return the value of the required effect parameter. Each effect type may have different parameters with different values to refine them. Predefined effect parameter types are available in effectParameterType. Platform-specific types are defined in QAudioEffects. The index parameter allows multiple occurences of the same parameter type.

Utils::Result Q::AudioEffect::setEffect unsigned  int  ) 
 

Set the effect to use. Predefined effect types are available in effectType. Platform-specific types are defined in QAudioEffects.

Utils::Result Q::AudioEffect::setFloatEffectParameter unsigned int  param,
unsigned int  index,
float  value
 

Set an effect parameter and its value. Each effect type may have different parameters with different values to refine them. Predefined effect parameter types are available in effectParameterType. Platform-specific types are defined in QAudioEffects. The index parameter allows multiple occurences of the same parameter type.

Warning:
Only the parameters for the standard effect types pitchShift and reverb are stored in the Q Database. The parameters for platform-specific effects are not saved into the database

Utils::Result Q::AudioEffect::setIntEffectParameter unsigned int  param,
unsigned int  index,
int  value
 

Set an effect parameter. Each effect type may have different parameters with different values to refine them. Predefined effect parameter types are available in effectParameterType. Platform-specific types are defined in QAudioEffects. The index parameter allows multiple occurences of the same parameter type.

Warning:
Only the parameters for the standard effect types pitchShift and reverb are stored in the Q Database. The parameters for platform-specific effects are not saved into the database

Return to QSDK documentation Contents page. Contact details for support, information and fault-reporting.
Qube Software Limited © 2000-2004