Drag[en]gine Game Engine  1.0
deBaseSynthesizerSynthesizerInstance Class Referenceabstract

Synthesizer module synthesizer instance peer. More...

#include <deBaseSynthesizerSynthesizerInstance.h>

Public Member Functions

Constructors and Destructors
 deBaseSynthesizerSynthesizerInstance ()
 Create peer. More...
 
virtual ~deBaseSynthesizerSynthesizerInstance ()
 Clean up peer. More...
 
Notifications
virtual void SynthesizerChanged ()
 Synthesizer changed. More...
 
virtual void ControllerChanged (int index)
 Controller changed. More...
 
virtual void PlayTimeChanged ()
 Play time changed. More...
 
Generate sound
virtual bool Prepare ()=0
 Prepare synthesizer. More...
 
virtual void Reset ()=0
 Reset synthesizer playback. More...
 
virtual void GenerateSound (void *buffer, int bufferSize, int offset, int samples)=0
 Generate sound. More...
 

Detailed Description

Synthesizer module synthesizer instance peer.

Author
Pl├╝ss Roland
Version
1.0
Date
2015

Constructor & Destructor Documentation

◆ deBaseSynthesizerSynthesizerInstance()

deBaseSynthesizerSynthesizerInstance::deBaseSynthesizerSynthesizerInstance ( )

Create peer.

◆ ~deBaseSynthesizerSynthesizerInstance()

virtual deBaseSynthesizerSynthesizerInstance::~deBaseSynthesizerSynthesizerInstance ( )
virtual

Clean up peer.

Member Function Documentation

◆ ControllerChanged()

virtual void deBaseSynthesizerSynthesizerInstance::ControllerChanged ( int  index)
virtual

Controller changed.

◆ GenerateSound()

virtual void deBaseSynthesizerSynthesizerInstance::GenerateSound ( void *  buffer,
int  bufferSize,
int  offset,
int  samples 
)
pure virtual

Generate sound.

Parameters
[out]bufferBuffer to store samples in.
[in]bufferSizeSize of buffer in bytes to store samples in. Has to match format.
[in]offsetOffset in samples to produce sound at.
[in]samplesNumber of samples to produce.
Exceptions
EInvalidParamstateDataSize does not match state data size required by synthesizer module.
EInvalidParamstateData is NULL and GetStateDataSize() is not 0.
EInvalidParambufferSize does not match format.
EInvalidParambuffer is NULL.

◆ PlayTimeChanged()

virtual void deBaseSynthesizerSynthesizerInstance::PlayTimeChanged ( )
virtual

Play time changed.

◆ Prepare()

virtual bool deBaseSynthesizerSynthesizerInstance::Prepare ( )
pure virtual

Prepare synthesizer.

Has to be called before GenerateSound() is called.

Returns
true If playback relevant data changed. The audio module has to restart playing from the start of the play range. These are playback relevant data causing Prepare() to return true:
  • Synthesizer using SetSynthesizer() and its parameters differ from the last one.
  • Sample count using SetSampleCount() on instance or set synthesizer.
  • Sample rate on set synthesizer.
  • Bit count on set synthesizer.

Prepare() does not return true if the controllers, links or sources of the set synthesizer changed. true is only returned if a parameter changes affecting playback in an audio module like the sound data format

◆ Reset()

virtual void deBaseSynthesizerSynthesizerInstance::Reset ( )
pure virtual

Reset synthesizer playback.

◆ SynthesizerChanged()

virtual void deBaseSynthesizerSynthesizerInstance::SynthesizerChanged ( )
virtual

Synthesizer changed.


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