arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CachedVolumeControl Class Reference

In order to optimize the processing time we cache the last input & factor and recalculate the new factor only if the input has changed. More...

#include <VolumeControl.h>

Inheritance diagram for CachedVolumeControl:
VolumeControl

Public Member Functions

 CachedVolumeControl (VolumeControl &vc)
 
 CachedVolumeControl (VolumeControl *vc)
 
virtual float getVolumeFactor (float volume)
 determines a multiplication factor (0.0 to 1.0) from an input value (0.0 to 1.0).
 
void setVolumeControl (VolumeControl &vc)
 

Protected Member Functions

virtual float limit (float in)
 limits the output to the range of 0 to 1.0
 

Protected Attributes

float in =1.0
 
float out =1.0
 
VolumeControlp_vc =nullptr
 

Detailed Description

In order to optimize the processing time we cache the last input & factor and recalculate the new factor only if the input has changed.

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ CachedVolumeControl() [1/2]

◆ CachedVolumeControl() [2/2]

Member Function Documentation

◆ getVolumeFactor()

virtual float getVolumeFactor ( float  volume)
inlinevirtual

determines a multiplication factor (0.0 to 1.0) from an input value (0.0 to 1.0).

Implements VolumeControl.

◆ limit()

virtual float limit ( float  in)
inlineprotectedvirtualinherited

limits the output to the range of 0 to 1.0

◆ setVolumeControl()

void setVolumeControl ( VolumeControl vc)
inline

Member Data Documentation

◆ in

float in =1.0
protected

◆ out

float out =1.0
protected

◆ p_vc

VolumeControl* p_vc =nullptr
protected

The documentation for this class was generated from the following file: