Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

otFIR Class Reference
[FIR - Finite impulse response (FIR) filter.FIR - Finite impulse response (FIR) filter.]

Class for FIR digital filter.

#include <otFIR.h>


Public Types

enum  DataType { DT_FLOAT, DT_INT }

Public Member Functions

 otFIR ()
bool init (U8 dataType, U16 nTap)
void close ()
F32 process (F32 val)
S16 process (S16 val)
void setCoefficients (int num,...)
void setCoefficientsIdx (int index, int num,...)


Member Enumeration Documentation

enum otFIR::DataType
 

Enumeration values:
DT_FLOAT  Single precision floating point.
DT_INT  Signed 16 bit.


Constructor & Destructor Documentation

otFIR.otFIR  ) 
 

Create the class


Member Function Documentation

void otFIR.close  ) 
 

Free all allocated buffer

bool otFIR.init U8  dataType,
U16  nTap
 

Init the class

Parameters:
dataType Type of data, see DataType
nTap Number of coefficients. Accepted range 1 to 511
Returns:
True on success

S16 otFIR.process S16  val  ) 
 

Process a sample

Parameters:
val Sample to be processed
Returns:
Filtered sample

F32 otFIR.process F32  val  ) 
 

Process a sample

Parameters:
val Sample to be processed
Returns:
Filtered sample

void otFIR.setCoefficients int  num,
  ...
 

Set coefficients

Parameters:
num Number of coefficients. \... List of coefficients

void otFIR.setCoefficientsIdx int  index,
int  num,
  ...
 

Set coefficients

Parameters:
index Start index of coefficients
num Number of coefficients. \... List of coefficients


The documentation for this class was generated from the following file: footer
otStudio - Library Reference - (C) 2020-23 Officina Turini, All Rights Reserved
Document built with Doxygen 1.4.0