arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
audio_tools::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 <Converter.h>

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

Public Member Functions

 SilenceRemovalConverter (int n=8, int aplidudeLimit=2)
 
virtual size_t convert (uint8_t *data, size_t size) override
 
- 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 Member Functions

int findLastAudioPos (T *audio, int pos)
 
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>
class 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

Member Function Documentation

◆ convert()

template<typename T >
virtual size_t audio_tools::SilenceRemovalConverter< T >::convert ( uint8_t *  data,
size_t  size 
)
inlineoverridevirtual

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