CLAM-Development
1.1
|
#include <LPC_AutoCorrelation.hxx>
Public Member Functions | |
LPC_AutoCorrelation () | |
virtual | ~LPC_AutoCorrelation () |
const char * | GetClassName () const |
Override it in every subclass and retur the name of that class. | |
const ProcessingConfig & | GetConfig () const |
Configuration getter. | |
bool | Do () |
Supervised mode execution method (using ports) | |
bool | Do (const Audio &in, LPModel &out) |
bool | Do (const Audio &in, DataArray &A, DataArray &K, TData &E) |
Protected Member Functions | |
bool | ConcreteConfigure (const ProcessingConfig &cfg) |
Configuration method interface. | |
void | ComputeAutocorrelation (const Array< TData > &signal, Array< TData > &acCoeffs) |
void | SolveSystemByLevinsonDurbin (const Array< TData > &R, Array< TData > &A, Array< TData > &K, TData &E) |
Protected Attributes | |
InPort< Audio > | mAudioIn |
OutPort< LPModel > | mLPModelOut |
OutPort< Spectrum > | mSpectrumOut |
LPCConfig | mCurrentConfig |
Definition at line 49 of file LPC_AutoCorrelation.hxx.
Definition at line 52 of file LPC_AutoCorrelation.cxx.
References CLAM::Processing::Configure().
CLAM::LPC_AutoCorrelation::~LPC_AutoCorrelation | ( | ) | [virtual] |
Definition at line 60 of file LPC_AutoCorrelation.cxx.
void CLAM::LPC_AutoCorrelation::ComputeAutocorrelation | ( | const Array< TData > & | signal, |
Array< TData > & | acCoeffs | ||
) | [protected] |
Definition at line 184 of file LPC_AutoCorrelation.cxx.
References CLAM::dot_product(), CLAM::Array< T >::GetPtr(), NULL, and CLAM::Array< T >::Size().
Referenced by Do().
bool CLAM::LPC_AutoCorrelation::ConcreteConfigure | ( | const ProcessingConfig & | ) | [protected, virtual] |
Configuration method interface.
The Processing base class forces all the concrete classes derived from it to implement this method, which must actually perform the specific configuration tasks.
Note that the user can not call this method directly. He will use Configure instead. The argument is expected to be an object of the necesary concrete configuration class.
Reference | to the configuration object. |
true if the processing object is left in a consistent state, and can be executed.
This | method must throw a bad_cast exception if the argument is not an object of the expected configuration class. |
Reimplemented from CLAM::Processing.
Definition at line 163 of file LPC_AutoCorrelation.cxx.
References CLAM_ASSERT, CLAM::Processing::CopyAsConcreteConfig(), and mCurrentConfig.
bool CLAM::LPC_AutoCorrelation::Do | ( | ) | [virtual] |
Supervised mode execution method (using ports)
Implements CLAM::Processing.
Definition at line 64 of file LPC_AutoCorrelation.cxx.
References CLAM::SpecTypeFlags::bComplex, CLAM::SpecTypeFlags::bMagPhase, CLAM::InPort< Token >::Consume(), CLAM::InPort< Token >::GetData(), CLAM::OutPort< Token >::GetData(), CLAM::Audio::GetSize(), mAudioIn, mCurrentConfig, mLPModelOut, mSpectrumOut, CLAM::OutPort< Token >::Produce(), CLAM::Spectrum::SetSize(), CLAM::Spectrum::SetType(), CLAM::LPModel::ToSpectrum(), and CLAM::LPModel::UpdateModelOrder().
Referenced by Do().
bool CLAM::LPC_AutoCorrelation::Do | ( | const Audio & | in, |
LPModel & | out | ||
) |
Definition at line 86 of file LPC_AutoCorrelation.cxx.
References Do(), and CLAM::DynamicType::UpdateData().
bool CLAM::LPC_AutoCorrelation::Do | ( | const Audio & | in, |
DataArray & | A, | ||
DataArray & | K, | ||
TData & | E | ||
) |
Special K!
Definition at line 139 of file LPC_AutoCorrelation.cxx.
References CLAM::Processing::AbleToExecute(), ComputeAutocorrelation(), CLAM::Array< T >::GetPtr(), mCurrentConfig, CLAM::Array< T >::Resize(), CLAM::Array< T >::SetSize(), CLAM::Array< T >::Size(), and SolveSystemByLevinsonDurbin().
const char * CLAM::LPC_AutoCorrelation::GetClassName | ( | ) | const [inline, virtual] |
Override it in every subclass and retur the name of that class.
Implements CLAM::Processing.
Definition at line 88 of file LPC_AutoCorrelation.hxx.
const ProcessingConfig & CLAM::LPC_AutoCorrelation::GetConfig | ( | ) | const [inline, virtual] |
Configuration getter.
Gets the configuration parameters used to create the object.
Reimplemented from CLAM::Processing.
Definition at line 93 of file LPC_AutoCorrelation.hxx.
References mCurrentConfig.
void CLAM::LPC_AutoCorrelation::SolveSystemByLevinsonDurbin | ( | const Array< TData > & | R, |
Array< TData > & | A, | ||
Array< TData > & | K, | ||
TData & | E | ||
) | [protected] |
Definition at line 219 of file LPC_AutoCorrelation.cxx.
References CLAM_ASSERT, mCurrentConfig, and CLAM::Array< T >::Size().
Referenced by Do().
InPort<Audio> CLAM::LPC_AutoCorrelation::mAudioIn [protected] |
Definition at line 67 of file LPC_AutoCorrelation.hxx.
Referenced by Do().
LPCConfig CLAM::LPC_AutoCorrelation::mCurrentConfig [protected] |
Definition at line 71 of file LPC_AutoCorrelation.hxx.
Referenced by ConcreteConfigure(), Do(), GetConfig(), and SolveSystemByLevinsonDurbin().
OutPort<LPModel> CLAM::LPC_AutoCorrelation::mLPModelOut [protected] |
Definition at line 68 of file LPC_AutoCorrelation.hxx.
Referenced by Do().
OutPort<Spectrum> CLAM::LPC_AutoCorrelation::mSpectrumOut [protected] |
Definition at line 69 of file LPC_AutoCorrelation.hxx.
Referenced by Do().