NAP
Public Member Functions | List of all members
LevelMeterComponentInstance Class Reference

#include <audio/component/levelmetercomponent.h>

Public Member Functions

 LevelMeterComponentInstance (EntityInstance &entity, Component &resource)
 
bool init (utility::ErrorState &errorState) override
 
ControllerValue getLevel ()
 
void setCenterFrequency (ControllerValue centerFrequency)
 
void setBandWidth (ControllerValue bandWidth)
 
void setFilterGain (ControllerValue gain)
 
ControllerValue getCenterFrequency () const
 
ControllerValue getBandWidth () const
 
ControllerValue getFilterGain () const
 
void setInput (AudioComponentBaseInstance &input)
 
- Public Member Functions inherited from ComponentInstance
 ComponentInstance (EntityInstance &entity, Component &resource)
 
virtual void update (double deltaTime)
 
nap::EntityInstancegetEntityInstance () const
 
nap::ComponentgetComponent () const
 
template<typename T >
T * getComponent () const
 
virtual bool init (utility::ErrorState &errorState)
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Description

Instance of component to measure the amplitude level of the audio signal from an AudioComponentBase. A specific frequency band to be measured can be specified.

Inheritance diagram for LevelMeterComponentInstance:
[legend]
Collaboration diagram for LevelMeterComponentInstance:
[legend]

Constructor & Destructor Documentation

◆ LevelMeterComponentInstance()

LevelMeterComponentInstance ( EntityInstance entity,
Component resource 
)

Member Function Documentation

◆ getBandWidth()

ControllerValue getBandWidth ( ) const
Returns
the bandwidth in Hz of the band that will be analyzed. Always returns 0 when the property mFilterInput in LevelMeterComponent is set to false.

◆ getCenterFrequency()

ControllerValue getCenterFrequency ( ) const
Returns
the center frequency in Hz of the band that will be analyzed. Always returns 0 when the property mFilterInput in LevelMeterComponent is set to false.

◆ getFilterGain()

ControllerValue getFilterGain ( ) const
Returns
the gain factor of the filtered signal. Always returns 0 when the property mFilterInput in LevelMeterComponent is set to false.

◆ getLevel()

ControllerValue getLevel ( )
Returns
the current level for a certain channel

◆ init()

bool init ( utility::ErrorState errorState)
overridevirtual

Initializes this component based on it's resource.

Parameters
errorStatecontains the error when initialization fails.
Returns
if initialization succeeded.

Reimplemented from ComponentInstance.

◆ setBandWidth()

void setBandWidth ( ControllerValue  bandWidth)

Sets the bandwidth in Hz of the band that will be analyzed. Only has effect when the property mFilterInput in LevelMeterComponent is set to true.

◆ setCenterFrequency()

void setCenterFrequency ( ControllerValue  centerFrequency)

Sets the center frequency in Hz of the band that will be analyzed. Only has effect when the property mFilterInput in LevelMeterComponent is set to true.

◆ setFilterGain()

void setFilterGain ( ControllerValue  gain)

Sets the gain factor of the filtered signal. Only has effect when the property mFilterInput in LevelMeterComponent is set to true.

◆ setInput()

void setInput ( AudioComponentBaseInstance input)

Connects a different audio component as input to be analyzed.