arduino-audio-tools
Loading...
Searching...
No Matches
Decimate Class Reference

Provides a reduced sampling rate by taking a sample at every factor location (ingoring factor-1 samples). More...

#include <CodecOpusOgg.h>

Inheritance diagram for Decimate:
BaseConverter BaseConverter

Classes

struct  DecimateState
struct  DecimateStateT

Public Member Functions

 Decimate ()=default
 Decimate ()=default
 Decimate (int factor, int channels, int bits_per_sample)
 Decimate (int factor, int channels, int bits_per_sample)
 ~Decimate () override
 ~Decimate () override
void clear ()
void clear ()
size_t convert (uint8_t *src, size_t size)
size_t convert (uint8_t *src, size_t size)
size_t convert (uint8_t *target, uint8_t *src, size_t size)
size_t convert (uint8_t *target, uint8_t *src, size_t size)
 operator bool ()
 operator bool ()
void reset ()
void reset ()
void setBits (int bits)
void setBits (int bits)
void setChannels (int channels)
 Defines the number of channels.
void setChannels (int channels)
 Defines the number of channels.
void setFactor (int factor)
 Sets the factor: e.g. with 4 we keep every forth sample.
void setFactor (int factor)
 Sets the factor: e.g. with 4 we keep every forth sample.

Protected Member Functions

bool isConfigValid ()
bool isConfigValid ()
void resetState ()
void resetState ()

Protected Attributes

int bits = 16
int channels = 2
int factor = 1
DecimateState * state = nullptr

Detailed Description

Provides a reduced sampling rate by taking a sample at every factor location (ingoring factor-1 samples).

Constructor & Destructor Documentation

◆ Decimate() [1/4]

Decimate ( )
default

◆ Decimate() [2/4]

Decimate ( int factor,
int channels,
int bits_per_sample )
inline

◆ ~Decimate() [1/2]

~Decimate ( )
inlineoverride

◆ Decimate() [3/4]

Decimate ( )
default

◆ Decimate() [4/4]

Decimate ( int factor,
int channels,
int bits_per_sample )
inline

◆ ~Decimate() [2/2]

~Decimate ( )
inlineoverride

Member Function Documentation

◆ clear() [1/2]

void clear ( )
inline

◆ clear() [2/2]

void clear ( )
inline

◆ convert() [1/4]

size_t convert ( uint8_t * src,
size_t size )
inlinevirtual

Implements BaseConverter.

◆ convert() [2/4]

size_t convert ( uint8_t * src,
size_t size )
inlinevirtual

Implements BaseConverter.

◆ convert() [3/4]

size_t convert ( uint8_t * target,
uint8_t * src,
size_t size )
inline

◆ convert() [4/4]

size_t convert ( uint8_t * target,
uint8_t * src,
size_t size )
inline

◆ isConfigValid() [1/2]

bool isConfigValid ( )
inlineprotected

◆ isConfigValid() [2/2]

bool isConfigValid ( )
inlineprotected

◆ operator bool() [1/2]

operator bool ( )
inline

◆ operator bool() [2/2]

operator bool ( )
inline

◆ reset() [1/2]

void reset ( )
inline

◆ reset() [2/2]

void reset ( )
inline

◆ resetState() [1/2]

void resetState ( )
inlineprotected

◆ resetState() [2/2]

void resetState ( )
inlineprotected

◆ setBits() [1/2]

void setBits ( int bits)
inline

◆ setBits() [2/2]

void setBits ( int bits)
inline

◆ setChannels() [1/2]

void setChannels ( int channels)
inline

Defines the number of channels.

◆ setChannels() [2/2]

void setChannels ( int channels)
inline

Defines the number of channels.

◆ setFactor() [1/2]

void setFactor ( int factor)
inline

Sets the factor: e.g. with 4 we keep every forth sample.

◆ setFactor() [2/2]

void setFactor ( int factor)
inline

Sets the factor: e.g. with 4 we keep every forth sample.

Member Data Documentation

◆ bits

int bits = 16
protected

◆ channels

int channels = 2
protected

◆ factor

int factor = 1
protected

◆ state

DecimateState * state = nullptr
protected

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