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

#include <audio/component/inputcomponent.h>

Public Member Functions

 AudioInputComponentInstance (EntityInstance &entity, Component &resource)
 
bool init (utility::ErrorState &errorState) override
 
int getChannelCount () const override
 
OutputPingetOutputForChannel (int channel) override
 
void setGain (ControllerValue gain)
 
ControllerValue getGain () const
 
- Public Member Functions inherited from AudioComponentBaseInstance
 AudioComponentBaseInstance (EntityInstance &entity, Component &resource)
 
- 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
 
- Public Member Functions inherited from IMultiChannelOutput
virtual ~IMultiChannelOutput ()=default
 
OutputPintryGetOutputForChannel (unsigned int)
 

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...
 
- Protected Member Functions inherited from AudioComponentBaseInstance
NodeManagergetNodeManager ()
 
AudioServicegetAudioService ()
 

Description

Instance of component to receive audio input from the audio interface. Can be used as input to an OutputComponent of LevelMeterComponent.

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

Constructor & Destructor Documentation

◆ AudioInputComponentInstance()

AudioInputComponentInstance ( EntityInstance entity,
Component resource 
)

Member Function Documentation

◆ getChannelCount()

int getChannelCount ( ) const
overridevirtual

Override this method to specify the number of audio channels output by this object.

Returns
the number of channels this object outputs.

Implements IMultiChannelOutput.

◆ getGain()

ControllerValue getGain ( ) const
Returns
: Gain factor of the input signal.

◆ getOutputForChannel()

OutputPin* getOutputForChannel ( int  channel)
overridevirtual

To be overridden by descendants.

Parameters
channelchannel index to request the output for
Returns
the output pin that outputs audio data for the specified channel.

Implements IMultiChannelOutput.

◆ 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.

◆ setGain()

void setGain ( ControllerValue  gain)

Set the input gain factor of the input signal.