arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
audio_tools::ConverterScaler< T > Class Template Reference

Multiplies the values with the indicated factor adds the offset and clips at maxValue. To mute use a factor of 0.0! More...

#include <Converter.h>

Inheritance diagram for audio_tools::ConverterScaler< T >:
audio_tools::BaseConverter< T >

Public Member Functions

 ConverterScaler (float factor, T offset, T maxValue, int channels=2)
 
size_t convert (uint8_t *src, size_t byte_count)
 
float factor ()
 Determines the actual factor (volume)
 
offset ()
 Determines the offset value.
 
void setFactor (T factor)
 Defines the factor (volume)
 
void setOffset (T offset)
 Defines the offset.
 
- Public Member Functions inherited from audio_tools::BaseConverter< T >
 BaseConverter (BaseConverter const &)=delete
 
virtual size_t convert (uint8_t *src, size_t size)=0
 
BaseConverteroperator= (BaseConverter const &)=delete
 

Protected Attributes

int channels
 
float factor_value
 
maxValue
 
offset_value
 

Detailed Description

template<typename T>
class audio_tools::ConverterScaler< T >

Multiplies the values with the indicated factor adds the offset and clips at maxValue. To mute use a factor of 0.0!

Author
Phil Schatzmann
Template Parameters
T

Member Function Documentation

◆ convert()

template<typename T >
size_t audio_tools::ConverterScaler< T >::convert ( uint8_t *  src,
size_t  byte_count 
)
inlinevirtual

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