RealTimeEffectModelTransformer Class Reference

#include <RealTimeEffectModelTransformer.h>

Inherits ModelTransformer.

Inheritance diagram for RealTimeEffectModelTransformer:

Inheritance graph
[legend]
Collaboration diagram for RealTimeEffectModelTransformer:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 24 of file RealTimeEffectModelTransformer.h.

Public Types

enum  Type { RTThread, NonRTThread }

Public Slots

void start ()

Public Member Functions

 RealTimeEffectModelTransformer (Input input, const Transform &transform)
virtual ~RealTimeEffectModelTransformer ()
void abandon ()
 Hint to the processing thread that it should give up, for example because the process is going to exit or we want to get rid of the input model.
ModelgetInputModel ()
 Return the input model for the transform.
int getInputChannel ()
 Return the input channel spec for the transform.
ModelgetOutputModel ()
 Return the output model created by the transform.
ModeldetachOutputModel ()
 Return the output model, also detaching it from the transformer so that it will not be deleted when the transformer is.
QString getMessage () const
 Return a warning or error message.

Protected Member Functions

virtual void run ()
DenseTimeValueModelgetConformingInput ()

Protected Attributes

QString m_units
RealTimePluginInstancem_plugin
int m_outputNo
Transform m_transform
Input m_input
Modelm_output
bool m_detached
bool m_abandoned
QString m_message


Member Enumeration Documentation

enum Thread::Type [inherited]

Enumerator:
RTThread 
NonRTThread 

Definition at line 27 of file Thread.h.


Constructor & Destructor Documentation

RealTimeEffectModelTransformer::RealTimeEffectModelTransformer ( Input  input,
const Transform transform 
)

Definition at line 32 of file RealTimeEffectModelTransformer.cpp.

References RealTimePluginInstance::getAudioOutputCount(), Transform::getBlockSize(), DenseTimeValueModel::getChannelCount(), getConformingInput(), RealTimePluginInstance::getControlOutputCount(), Transform::getIdentifier(), TransformFactory::getInstance(), Transform::getOutput(), Transform::getPluginIdentifier(), Model::getSampleRate(), TransformFactory::getTransformUnits(), RealTimePluginFactory::instanceFor(), RealTimePluginFactory::instantiatePlugin(), ModelTransformer::m_output, m_outputNo, m_plugin, ModelTransformer::m_transform, m_units, Transform::setBlockSize(), TransformFactory::setPluginParameters(), and SparseValueModel< PointType >::setScaleUnits().

RealTimeEffectModelTransformer::~RealTimeEffectModelTransformer (  )  [virtual]

Definition at line 102 of file RealTimeEffectModelTransformer.cpp.

References m_plugin.


Member Function Documentation

void RealTimeEffectModelTransformer::run (  )  [protected, virtual]

Definition at line 119 of file RealTimeEffectModelTransformer.cpp.

References SparseValueModel< PointType >::addPoint(), RealTimePluginInstance::getAudioInputBuffers(), RealTimePluginInstance::getAudioInputCount(), RealTimePluginInstance::getAudioOutputBuffers(), RealTimePluginInstance::getBufferSize(), DenseTimeValueModel::getChannelCount(), getConformingInput(), RealTimePluginInstance::getControlOutputCount(), RealTimePluginInstance::getControlOutputValue(), DenseTimeValueModel::getData(), Transform::getDuration(), RealTimePluginInstance::getLatency(), Model::getSampleRate(), Transform::getStartTime(), Model::isReady(), ModelTransformer::m_abandoned, ModelTransformer::m_input, ModelTransformer::m_output, m_outputNo, m_plugin, ModelTransformer::m_transform, RealTime::realTime2Frame(), RealTimePluginInstance::run(), and SparseModel< PointType >::setCompletion().

DenseTimeValueModel * RealTimeEffectModelTransformer::getConformingInput (  )  [protected]

Definition at line 108 of file RealTimeEffectModelTransformer.cpp.

References ModelTransformer::getInputModel().

Referenced by RealTimeEffectModelTransformer(), and run().

void ModelTransformer::abandon (  )  [inline, inherited]

Hint to the processing thread that it should give up, for example because the process is going to exit or we want to get rid of the input model.

Caller should still wait() and/or delete the transform before assuming its input and output models are no longer required.

Definition at line 66 of file ModelTransformer.h.

References ModelTransformer::m_abandoned.

Model* ModelTransformer::getInputModel (  )  [inline, inherited]

Return the input model for the transform.

Definition at line 71 of file ModelTransformer.h.

References ModelTransformer::Input::getModel(), and ModelTransformer::m_input.

Referenced by getConformingInput(), and FeatureExtractionModelTransformer::getConformingInput().

int ModelTransformer::getInputChannel (  )  [inline, inherited]

Return the input channel spec for the transform.

Definition at line 76 of file ModelTransformer.h.

References ModelTransformer::Input::getChannel(), and ModelTransformer::m_input.

Model* ModelTransformer::getOutputModel (  )  [inline, inherited]

Return the output model created by the transform.

Returns a null model if the transform could not be initialised; an error message may be available via getMessage() in this situation.

Definition at line 83 of file ModelTransformer.h.

References ModelTransformer::m_output.

Model* ModelTransformer::detachOutputModel (  )  [inline, inherited]

Return the output model, also detaching it from the transformer so that it will not be deleted when the transformer is.

The caller takes ownership of the model.

Definition at line 90 of file ModelTransformer.h.

References ModelTransformer::m_detached, and ModelTransformer::m_output.

Referenced by ModelTransformerFactory::transform().

QString ModelTransformer::getMessage (  )  const [inline, inherited]

Return a warning or error message.

If getOutputModel returned a null pointer, this should contain a fatal error message for the transformer; otherwise it may contain a warning to show to the user about e.g. suboptimal block size or whatever.

Definition at line 98 of file ModelTransformer.h.

References ModelTransformer::m_message.

Referenced by ModelTransformerFactory::transform().

void Thread::start (  )  [slot, inherited]

Definition at line 34 of file Thread.cpp.

References Thread::m_type, and Thread::RTThread.

Referenced by AudioCallbackPlaySource::addModel(), WaveFileModel::fillCache(), FFTDataServer::getCacheAux(), FFTDataServer::isColumnReady(), MatrixFile::MatrixFile(), MP3FileReader::MP3FileReader(), OggVorbisFileReader::OggVorbisFileReader(), DSSIPluginInstance::requestNonRTThread(), ResamplingWavFileReader::ResamplingWavFileReader(), FFTDataServer::FillThread::run(), and ModelTransformerFactory::transform().


Member Data Documentation

QString RealTimeEffectModelTransformer::m_units [protected]

Definition at line 34 of file RealTimeEffectModelTransformer.h.

Referenced by RealTimeEffectModelTransformer().

RealTimePluginInstance* RealTimeEffectModelTransformer::m_plugin [protected]

Definition at line 35 of file RealTimeEffectModelTransformer.h.

Referenced by RealTimeEffectModelTransformer(), run(), and ~RealTimeEffectModelTransformer().

int RealTimeEffectModelTransformer::m_outputNo [protected]

Definition at line 36 of file RealTimeEffectModelTransformer.h.

Referenced by RealTimeEffectModelTransformer(), and run().

Transform ModelTransformer::m_transform [protected, inherited]

Definition at line 103 of file ModelTransformer.h.

Referenced by FeatureExtractionModelTransformer::FeatureExtractionModelTransformer(), RealTimeEffectModelTransformer(), run(), and FeatureExtractionModelTransformer::run().

Input ModelTransformer::m_input [protected, inherited]

Definition at line 104 of file ModelTransformer.h.

Referenced by FeatureExtractionModelTransformer::addFeature(), FeatureExtractionModelTransformer::getFrames(), ModelTransformer::getInputChannel(), ModelTransformer::getInputModel(), run(), and FeatureExtractionModelTransformer::run().

Model* ModelTransformer::m_output [protected, inherited]

Definition at line 105 of file ModelTransformer.h.

Referenced by FeatureExtractionModelTransformer::addFeature(), ModelTransformer::detachOutputModel(), FeatureExtractionModelTransformer::FeatureExtractionModelTransformer(), FeatureExtractionModelTransformer::getConformingOutput(), ModelTransformer::getOutputModel(), RealTimeEffectModelTransformer(), run(), FeatureExtractionModelTransformer::run(), and ModelTransformer::~ModelTransformer().

bool ModelTransformer::m_detached [protected, inherited]

Definition at line 106 of file ModelTransformer.h.

Referenced by ModelTransformer::detachOutputModel(), and ModelTransformer::~ModelTransformer().

bool ModelTransformer::m_abandoned [protected, inherited]

Definition at line 107 of file ModelTransformer.h.

Referenced by ModelTransformer::abandon(), run(), FeatureExtractionModelTransformer::run(), and ModelTransformer::~ModelTransformer().

QString ModelTransformer::m_message [protected, inherited]

Definition at line 108 of file ModelTransformer.h.

Referenced by FeatureExtractionModelTransformer::FeatureExtractionModelTransformer(), and ModelTransformer::getMessage().


The documentation for this class was generated from the following files:
Generated on Wed Feb 20 15:45:35 2008 for SonicVisualiser by  doxygen 1.5.1