arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
audio_tools::ResampleParameterEstimator Class Reference

Class to determine a combination of upsample and downsample rates to achieve any ratio. More...

#include <Resample.h>

Public Member Functions

 ResampleParameterEstimator (int fromRate, int toRate, ResamplePrecision precision=Medium)
 
void begin (int fromRate, int toRate, ResamplePrecision precision=Medium)
 
int divisor ()
 propose divisor for downsampling
 
int downsample ()
 same as division
 
ResampleScenario downsampleScenario ()
 
int factor ()
 prposed factor for upsampling
 
int fromRate ()
 original sample rate
 
size_t supportedSize (size_t len)
 Determines a supported downsampling write size.
 
int toRate ()
 target sample rate
 
float toRateEffective ()
 effective target sample rate by upsampling and then downsampling at different factors
 
int upsample ()
 same as factor
 

Protected Member Functions

void calculate ()
 

Protected Attributes

float diff =10000000.0
 
int div =0
 
int div_array [28] = {1, 2, 3, 5, 7, 10, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 100}
 
int fact =0
 
int from_rate =0
 
int limits [4] = {6, 12, 18, 27 }
 
int precision =1
 
int to_rate =0
 
float to_rate_eff =0
 

Detailed Description

Class to determine a combination of upsample and downsample rates to achieve any ratio.

Author
Phil Schatzmann

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