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

Removes any silence from the buffer that is longer then n samples with a amplitude below the indicated threshhold. If you process multiple channels you need to multiply the channels with the number of samples to indicate n. More...

#include <CodecOpusOgg.h>

Inheritance diagram for SilenceRemovalConverter< T >:
BaseConverter BaseConverter

Public Member Functions

 SilenceRemovalConverter (int n=8, int aplidudeLimit=2)
 SilenceRemovalConverter (int n=8, int aplidudeLimit=2)
void clear ()
void clear ()
virtual size_t convert (uint8_t *data, size_t size) override
virtual size_t convert (uint8_t *data, size_t size) override
void reset ()
void reset ()

Protected Member Functions

int findLastAudioPos (T *audio, int pos)
int findLastAudioPos (T *audio, int pos)
void set (int n=5, int aplidudeLimit=2)
void set (int n=5, int aplidudeLimit=2)

Protected Attributes

bool active = false
int amplidude_limit = 0
const uint8_t * buffer = nullptr
int n
int priorLastAudioPos = 0

Detailed Description

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

Removes any silence from the buffer that is longer then n samples with a amplitude below the indicated threshhold. If you process multiple channels you need to multiply the channels with the number of samples to indicate n.

Template Parameters
T

Constructor & Destructor Documentation

◆ SilenceRemovalConverter() [1/2]

template<typename T = int16_t>
SilenceRemovalConverter ( int n = 8,
int aplidudeLimit = 2 )
inline

◆ SilenceRemovalConverter() [2/2]

template<typename T = int16_t>
SilenceRemovalConverter ( int n = 8,
int aplidudeLimit = 2 )
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 * data,
size_t size )
inlineoverridevirtual

Implements BaseConverter.

◆ convert() [2/2]

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

Implements BaseConverter.

◆ findLastAudioPos() [1/2]

template<typename T = int16_t>
int findLastAudioPos ( T * audio,
int pos )
inlineprotected

◆ findLastAudioPos() [2/2]

template<typename T = int16_t>
int findLastAudioPos ( T * audio,
int pos )
inlineprotected

◆ reset() [1/2]

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

◆ reset() [2/2]

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

◆ set() [1/2]

template<typename T = int16_t>
void set ( int n = 5,
int aplidudeLimit = 2 )
inlineprotected

◆ set() [2/2]

template<typename T = int16_t>
void set ( int n = 5,
int aplidudeLimit = 2 )
inlineprotected

Member Data Documentation

◆ active

template<typename T = int16_t>
bool active = false
protected

◆ amplidude_limit

template<typename T = int16_t>
int amplidude_limit = 0
protected

◆ buffer

template<typename T = int16_t>
const uint8_t * buffer = nullptr
protected

◆ n

template<typename T = int16_t>
int n
protected

◆ priorLastAudioPos

template<typename T = int16_t>
int priorLastAudioPos = 0
protected

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