Drag[en]gine Game Engine  1.0
deSynthesizerSourceChain Class Reference

Synthesizer chain source. More...

#include <deSynthesizerSourceChain.h>

Inheritance diagram for deSynthesizerSourceChain:
deSynthesizerSource deObject

Public Member Functions

Management
int GetSoundCount () const
 Number of sound files. More...
 
deSoundGetSoundAt (int index) const
 Sound at index. More...
 
void AddSound (deSound *sound)
 Add sound. More...
 
void RemoveSound (int index)
 Remove sound from index. More...
 
void RemoveAllSounds ()
 Remove all sounds. More...
 
float GetMinSpeed () const
 Minimum play speed. More...
 
void SetMinSpeed (float speed)
 Set minimum play speed. More...
 
float GetMaxSpeed () const
 Maximum play speed. More...
 
void SetMaxSpeed (float speed)
 Set maximum play speed. More...
 
deSynthesizerControllerTargetGetTargetSpeed ()
 Play speed target. More...
 
const deSynthesizerControllerTargetGetTargetSpeed () const
 
deSynthesizerControllerTargetGetTargetSelect ()
 Select sound target. More...
 
const deSynthesizerControllerTargetGetTargetSelect () const
 
deSynthesizerControllerTargetGetTargetPlay ()
 Play target. More...
 
const deSynthesizerControllerTargetGetTargetPlay () const
 
Visiting
virtual void Visit (deSynthesizerSourceVisitor &visitor)
 Visit source. More...
 
- Public Member Functions inherited from deSynthesizerSource
deSynthesizerGetSynthesizer () const
 Parent synthesizer. More...
 
void SetSynthesizer (deSynthesizer *synthesizer)
 Set parent synthesizer. More...
 
bool GetEnabled () const
 Source is enabled. More...
 
void SetEnabled (bool enabled)
 Set if source is enabled. More...
 
eMixModes GetMixMode () const
 Mixing mode. More...
 
void SetMixMode (eMixModes mode)
 Set mixing mode. More...
 
float GetBlendFactor () const
 Blend factor. More...
 
void SetBlendFactor (float factor)
 Set blend factor. More...
 
float GetMinVolume () const
 Volume minimum relative to speaker volume in the range from 0 to 1. More...
 
void SetMinVolume (float volume)
 Set minimum volume relative to speaker volume in the range from 0 to 1. More...
 
float GetMaxVolume () const
 Maximum volume relative to speaker volume in the range from 0 to 1. More...
 
void SetMaxVolume (float volume)
 Set maximum volume relative to speaker volume in the range from 0 to 1. More...
 
float GetMinPanning () const
 Minimum panning in the range from -1(left) to 1(right). More...
 
void SetMinPanning (float panning)
 Set minimum panning in the range from -1(left) to 1(right). More...
 
float GetMaxPanning () const
 Maximum panning in the range from -1(left) to 1(right). More...
 
void SetMaxPanning (float panning)
 Set maximum panning in the range from -1(left) to 1(right). More...
 
deSynthesizerControllerTargetGetTargetBlendFactor ()
 Blend factor target. More...
 
const deSynthesizerControllerTargetGetTargetBlendFactor () const
 
deSynthesizerControllerTargetGetTargetVolume ()
 Volume target. More...
 
const deSynthesizerControllerTargetGetTargetVolume () const
 
deSynthesizerControllerTargetGetTargetPanning ()
 Panning target. More...
 
const deSynthesizerControllerTargetGetTargetPanning () const
 
int GetEffectCount () const
 Number of effects. More...
 
deSynthesizerEffectGetEffectAt (int index) const
 Effect at index. More...
 
void AddEffect (deSynthesizerEffect *effect)
 Add effect. More...
 
void RemoveEffect (deSynthesizerEffect *effect)
 Remove effect. More...
 
void RemoveAllEffects ()
 Remove all effects. More...
 
 deSynthesizerSource ()
 Create synthesizer source. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Constructors and Destructors

 deSynthesizerSourceChain ()
 Create synthesizer source. More...
 
virtual ~deSynthesizerSourceChain ()
 Clean up synthesizer source. More...
 

Additional Inherited Members

- Public Types inherited from deSynthesizerSource
enum  eMixModes { emmBlend, emmAdd }
 Mixing modes. More...
 
- Protected Member Functions inherited from deSynthesizerSource
virtual ~deSynthesizerSource ()
 Clean up synthesizer source. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

Synthesizer chain source.

Plays back on the chain sound files like an announcer. The sound file to play is picked from a list of sound files using the select target. The play target is used to play, wait, pause or stop playback.

NULL sounds are allowed to be added providing a way to disable a sound without modifying the select curve to deal with it.

This source is best used for announcer type sound playback or other kind of playback requiring chaining sound files together.

Author
Pl├╝ss Roland
Version
1.0
Date
2015

Constructor & Destructor Documentation

◆ deSynthesizerSourceChain()

deSynthesizerSourceChain::deSynthesizerSourceChain ( )

Create synthesizer source.

◆ ~deSynthesizerSourceChain()

virtual deSynthesizerSourceChain::~deSynthesizerSourceChain ( )
protectedvirtual

Clean up synthesizer source.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ AddSound()

void deSynthesizerSourceChain::AddSound ( deSound sound)

Add sound.

◆ GetMaxSpeed()

float deSynthesizerSourceChain::GetMaxSpeed ( ) const
inline

Maximum play speed.

A value of 1 plays at orignal speed. A value of 2 would play double as fast. Negative values play backwards. A value of -1 would play backwards at original speed.

References SetMaxSpeed().

◆ GetMinSpeed()

float deSynthesizerSourceChain::GetMinSpeed ( ) const
inline

Minimum play speed.

A value of 1 plays at orignal speed. A value of 2 would play double as fast. Negative values play backwards. A value of -1 would play backwards at original speed.

References SetMinSpeed().

◆ GetSoundAt()

deSound* deSynthesizerSourceChain::GetSoundAt ( int  index) const

Sound at index.

◆ GetSoundCount()

int deSynthesizerSourceChain::GetSoundCount ( ) const

Number of sound files.

◆ GetTargetPlay() [1/2]

deSynthesizerControllerTarget& deSynthesizerSourceChain::GetTargetPlay ( )
inline

Play target.

Plays, waits, pauses or stops the source. This target is best used with links using constant interpolation curves. A value of 1 plays back the source. Once the current sound is finished the next is played according to the select target. A value of 2/3 waits playing. This is the same as play except once the sound finished no next sound is played until target switches to play. This can be used to add pauses between sounds. A value of 1/3 pauses the playback freezing playback position. A value of 0 stops playback and rewinds playback position to the beginning.

◆ GetTargetPlay() [2/2]

const deSynthesizerControllerTarget& deSynthesizerSourceChain::GetTargetPlay ( ) const
inline

References Visit().

◆ GetTargetSelect() [1/2]

deSynthesizerControllerTarget& deSynthesizerSourceChain::GetTargetSelect ( )
inline

Select sound target.

◆ GetTargetSelect() [2/2]

const deSynthesizerControllerTarget& deSynthesizerSourceChain::GetTargetSelect ( ) const
inline

◆ GetTargetSpeed() [1/2]

deSynthesizerControllerTarget& deSynthesizerSourceChain::GetTargetSpeed ( )
inline

Play speed target.

◆ GetTargetSpeed() [2/2]

const deSynthesizerControllerTarget& deSynthesizerSourceChain::GetTargetSpeed ( ) const
inline

◆ RemoveAllSounds()

void deSynthesizerSourceChain::RemoveAllSounds ( )

Remove all sounds.

◆ RemoveSound()

void deSynthesizerSourceChain::RemoveSound ( int  index)

Remove sound from index.

◆ SetMaxSpeed()

void deSynthesizerSourceChain::SetMaxSpeed ( float  speed)

Set maximum play speed.

A value of 1 plays at orignal speed. A value of 2 would play double as fast. Negative values play backwards. A value of -1 would play backwards at original speed.

Referenced by GetMaxSpeed().

◆ SetMinSpeed()

void deSynthesizerSourceChain::SetMinSpeed ( float  speed)

Set minimum play speed.

A value of 1 plays at orignal speed. A value of 2 would play double as fast. Negative values play backwards. A value of -1 would play backwards at original speed.

Referenced by GetMinSpeed().

◆ Visit()

virtual void deSynthesizerSourceChain::Visit ( deSynthesizerSourceVisitor visitor)
virtual

Visit source.

Reimplemented from deSynthesizerSource.

Referenced by GetTargetPlay().


The documentation for this class was generated from the following file: