arduino-audio-tools
Loading...
Searching...
No Matches
SmoothTransition< T > Class Template Reference

Changes the samples at the beginning or at the end to slowly ramp up the volume. More...

#include <CodecOpusOgg.h>

Inheritance diagram for SmoothTransition< T >:
BaseConverter BaseConverter

Public Member Functions

 SmoothTransition (int channels, bool fromBeginning, bool fromEnd, float inc=0.01)
 SmoothTransition (int channels, bool fromBeginning, bool fromEnd, float inc=0.01)
void clear ()
void clear ()
virtual size_t convert (uint8_t *src, size_t size)
virtual size_t convert (uint8_t *src, size_t size)
void reset ()
void reset ()

Protected Member Functions

void processEnd (T *values, int frameCount)
void processEnd (T *values, int frameCount)
void processStart (T *values, int frameCount)
void processStart (T *values, int frameCount)

Protected Attributes

int channels
float end_factor = 0
bool from_beginning
bool from_end
float inc = 0.01
float start_factor = 0

Detailed Description

template<typename T = int16_t>
class audio_tools::audio_tools::SmoothTransition< T >

Changes the samples at the beginning or at the end to slowly ramp up the volume.

Template Parameters
T

Constructor & Destructor Documentation

◆ SmoothTransition() [1/2]

template<typename T = int16_t>
SmoothTransition ( int channels,
bool fromBeginning,
bool fromEnd,
float inc = 0.01 )
inline

◆ SmoothTransition() [2/2]

template<typename T = int16_t>
SmoothTransition ( int channels,
bool fromBeginning,
bool fromEnd,
float inc = 0.01 )
inline

Member Function Documentation

◆ clear() [1/2]

template<typename T = int16_t>
void clear ( )
inline

◆ clear() [2/2]

template<typename T = int16_t>
void clear ( )
inline

◆ convert() [1/2]

template<typename T = int16_t>
virtual size_t convert ( uint8_t * src,
size_t size )
inlinevirtual

Implements BaseConverter.

◆ convert() [2/2]

template<typename T = int16_t>
virtual size_t convert ( uint8_t * src,
size_t size )
inlinevirtual

Implements BaseConverter.

◆ processEnd() [1/2]

template<typename T = int16_t>
void processEnd ( T * values,
int frameCount )
inlineprotected

◆ processEnd() [2/2]

template<typename T = int16_t>
void processEnd ( T * values,
int frameCount )
inlineprotected

◆ processStart() [1/2]

template<typename T = int16_t>
void processStart ( T * values,
int frameCount )
inlineprotected

◆ processStart() [2/2]

template<typename T = int16_t>
void processStart ( T * values,
int frameCount )
inlineprotected

◆ reset() [1/2]

template<typename T = int16_t>
void reset ( )
inline

◆ reset() [2/2]

template<typename T = int16_t>
void reset ( )
inline

Member Data Documentation

◆ channels

template<typename T = int16_t>
int channels
protected

◆ end_factor

template<typename T = int16_t>
float end_factor = 0
protected

◆ from_beginning

template<typename T = int16_t>
bool from_beginning
protected

◆ from_end

template<typename T = int16_t>
bool from_end
protected

◆ inc

template<typename T = int16_t>
float inc = 0.01
protected

◆ start_factor

template<typename T = int16_t>
float start_factor = 0
protected

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