Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

CFindAbsoluteMax Class Reference

#include <FEAPIExamplePluginFindMax.h>

Inherits CFeatureExtractBase.

Inheritance diagram for CFindAbsoluteMax:

[legend]
Collaboration diagram for CFindAbsoluteMax:
[legend]
List of all members.

Detailed Description

the class CFindAbsoluteMax is an example class to demonstrate how to implement a plugin for the Feature Extraction plugin API. The functionality of this plugin is to find the absolute maximum value per audio channel for each input block and return the two results in dBFS.

Definition at line 50 of file FEAPIExamplePluginFindMax.h.

Public Member Functions

 CFindAbsoluteMax ()
virtual ~CFindAbsoluteMax ()
FEAPI_Error_t SetPluginParameter (int iParameterIndex, float fValue)
float GetPluginParameter (int iParameterIndex)
int GetPluginResultLatency (int iResultIndex)
float GetPluginProperty (FEAPI_PluginProperty_t ePluginProperty)
FEAPI_Error_t InitializePlugin (float fInputSampleRate, int iNumberOfAudioChannels, int iHostApiMajorVersion, FEAPI_UserData_t *pstUserData)
FEAPI_Error_t ProcessPlugin (const float **ppfInputBuffer, const FEAPI_TimeStamp_t *ptFEAPI_TimeStamp, int iNumberOfFrames)
FEAPI_Error_t ProcessPluginDone ()
int GetPluginSizeOfResult (int iResultIndex)
FEAPI_Error_t GetPluginResult (int iResultIndex, float *pfResult, FEAPI_TimeStamp_t *ptFEAPI_TimeStamp)
FEAPI_Error_t ResetPlugin ()


Constructor & Destructor Documentation

CFindAbsoluteMax::CFindAbsoluteMax  ) 
 

Definition at line 76 of file FEAPIExamplePluginFindMax.cpp.

CFindAbsoluteMax::~CFindAbsoluteMax  )  [virtual]
 

Definition at line 96 of file FEAPIExamplePluginFindMax.cpp.


Member Function Documentation

float CFindAbsoluteMax::GetPluginParameter int  iParameterIndex  )  [virtual]
 

Gets the current value of a parameter.

Parameters:
iParameterIndex : index of the parameter (setting) requested, index ranges from 0...NumOfParameters-1
Returns:
float : value of the parameter with index iParameterIndex

Reimplemented from CFeatureExtractBase.

Definition at line 184 of file FEAPIExamplePluginFindMax.cpp.

float CFindAbsoluteMax::GetPluginProperty FEAPI_PluginProperty_t  ePluginProperty  )  [virtual]
 

Gets an indication of the plugins capabilities.

Parameters:
ePluginProperty : requested property
Returns:
float : corresponding value

Implements CFeatureExtractBase.

Definition at line 272 of file FEAPIExamplePluginFindMax.cpp.

References FEAPI_kMaxChannels, FEAPI_kMaxFrameSize, FEAPI_kMaxSampleRate, FEAPI_kMinChannels, FEAPI_kMinFrameSize, FEAPI_kMinSampleRate, and FEAPI_kOptFrameSize.

FEAPI_Error_t CFindAbsoluteMax::GetPluginResult int  iResultIndex,
float *  pfResult,
FEAPI_TimeStamp_t ptFEAPI_TimeStamp
[virtual]
 

Gets one result.

Parameters:
iResultIndex : index of the requested result/feature, index ranges from 0...NumOfResults-1
pfResult : the result data is copied into this buffer
*ptFEAPI_TimeStamp : the time stamp of the result
Returns:
FEAPI_Error_t : FEAPI_kNoError when no error

Implements CFeatureExtractBase.

Definition at line 242 of file FEAPIExamplePluginFindMax.cpp.

References FEAPI_Error_t, and CFeatureExtractBase::GetPluginNumOfResults().

Here is the call graph for this function:

int CFindAbsoluteMax::GetPluginResultLatency int  iResultIndex  )  [virtual]
 

Gets the maximum latency of one result.

Parameters:
iResultIndex : index of the requested result (feature), index ranges from 0...NumOfResults-1
Returns:
int : number of samples (at audio input sample rate) which is required to calculate this result the first time (negative values are not allowed, 0 means undefined)

Reimplemented from CFeatureExtractBase.

Definition at line 191 of file FEAPIExamplePluginFindMax.cpp.

int CFindAbsoluteMax::GetPluginSizeOfResult int  iResultIndex  )  [virtual]
 

Gets the size of one result in FEAPI_Signal_t values (4 bytes per value).

Parameters:
iResultIndex : index of the result/feature the size is requested for, index ranges from 0...NumOfResults-1
Returns:
int : size of result in FEAPI_Signal_t values (4 bytes per value)

Implements CFeatureExtractBase.

Definition at line 230 of file FEAPIExamplePluginFindMax.cpp.

References CFeatureExtractBase::GetPluginNumOfResults().

Here is the call graph for this function:

FEAPI_Error_t CFindAbsoluteMax::InitializePlugin float  fInputSampleRate,
int  iNumberOfAudioChannels,
int  iHostApiMajorVersion,
FEAPI_UserData_t pstUserData
 

initializes a new instance of the plugin

Parameters:
fInputSampleRate : sample rate of input(s) in Hz
iNumberOfAudioChannels : number of input audio channels
iHostApiMajorVersion : major version number of host
pstUserData : pointer to user or vendor defined data (may be NULL)
Returns:
FEAPI_Error_t : FEAPI_kNoError when no error

Reimplemented from CFeatureExtractBase.

Definition at line 115 of file FEAPIExamplePluginFindMax.cpp.

References _FEATURE_DESCRIPTION, _FEATURE_NAME, _FEATURE_QUANTIZED, _FEATURE_RANGE_MAX, _FEATURE_RANGE_MIN, _FEATURE_SAMPLERATE, _FEATURE_UNIT, FEAPI_Error_t, FEAPI_TimeStamp_t, FEAPI_UserData_t, CFeatureExtractBase::GetPluginNumOfResults(), CFeatureExtractBase::InitializePlugin(), CFeatureExtractBase::SetPluginInputPinInfo(), and CFeatureExtractBase::SetPluginResultPinInfo().

Here is the call graph for this function:

FEAPI_Error_t CFindAbsoluteMax::ProcessPlugin const float **  ppfInputBuffer,
const FEAPI_TimeStamp_t ptFEAPI_TimeStamp,
int  iNumberOfFrames
 

Definition at line 204 of file FEAPIExamplePluginFindMax.cpp.

References FEAPI_Error_t, and CFeatureExtractBase::GetPluginNumOfInputs().

Here is the call graph for this function:

FEAPI_Error_t CFindAbsoluteMax::ProcessPluginDone  )  [virtual]
 

Signals that no more input data is available (does the final processing).

Returns:
FEAPI_Error_t : FEAPI_kNoError when no error

Reimplemented from CFeatureExtractBase.

Definition at line 198 of file FEAPIExamplePluginFindMax.cpp.

References FEAPI_Error_t.

FEAPI_Error_t CFindAbsoluteMax::ResetPlugin  )  [virtual]
 

Resets/clears all internal buffers and states, so that the plugin is in a state where it can start processing a new audio stream.

Returns:
FEAPI_Error_t : FEAPI_kNoError when no error

Reimplemented from CFeatureExtractBase.

Definition at line 259 of file FEAPIExamplePluginFindMax.cpp.

References FEAPI_Error_t, and CFeatureExtractBase::GetPluginNumOfResults().

Here is the call graph for this function:

FEAPI_Error_t CFindAbsoluteMax::SetPluginParameter int  iParameterIndex,
float  fValue
[virtual]
 

Sets a parameter to a specified value.

Parameters:
iParameterIndex : index of the parameter (setting) to be changed, index ranges from 0...NumOfParameters-1
fValue : new value of the parameter
Returns:
FEAPI_Error_t : FEAPI_kNoError when no error

Reimplemented from CFeatureExtractBase.

Definition at line 177 of file FEAPIExamplePluginFindMax.cpp.

References FEAPI_Error_t.


The documentation for this class was generated from the following files:
Generated on Fri Mar 23 10:28:57 2007 for FEAPI Plugin Documentation by  doxygen 1.3.9.1