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

Provide the volume function as callback method: This is easy to use e.g together with a lamda function! More...

#include <VolumeControl.h>

Inheritance diagram for CallbackVolumeControl:
VolumeControl

Public Member Functions

 CallbackVolumeControl (float(*cb)(float in))
 
virtual float getVolumeFactor (float volume)
 determines a multiplication factor (0.0 to 1.0) from an input value (0.0 to 1.0).
 

Protected Member Functions

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

Protected Attributes

float(* callback )(float in) = nullptr
 

Detailed Description

Provide the volume function as callback method: This is easy to use e.g together with a lamda function!

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ CallbackVolumeControl()

CallbackVolumeControl ( float(*)(float in)  cb)
inline

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

Member Data Documentation

◆ callback

float(* callback) (float in) = nullptr
protected

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