|
| OverSampler (EFactor factor=kNone, bool blockProcessing=true, int nInChannels=1, int nOutChannels=1) |
|
| OverSampler (const OverSampler &)=delete |
|
OverSampler & | operator= (const OverSampler &)=delete |
|
void | Reset (int blockSize=DEFAULT_BLOCK_SIZE) |
|
void | ProcessBlock (T **inputs, T **outputs, int nFrames, int nInChans, int nOutChans, BlockProcessFunc func) |
| Over sample an input block with a per-block function (up sample input -> process with function -> down sample) More...
|
|
T | Process (T input, std::function< T(T)> func) |
| Over sample an input sample with a per-sample function (up-sample input -> process with function -> down-sample) More...
|
|
T | ProcessGen (std::function< T()> genFunc) |
| Over-sample an per-sample synthesis function. More...
|
|
void | SetOverSampling (EFactor factor) |
|
int | GetRate () const |
|
template<typename T = double>
class OverSampler< T >
Definition at line 41 of file Oversampler.h.
◆ BlockProcessFunc
template<typename T = double>
using OverSampler< T >::BlockProcessFunc = std::function<void(T**, T**, int)> |
◆ OverSampler()
template<typename T = double>
OverSampler< T >::OverSampler |
( |
EFactor |
factor = kNone , |
|
|
bool |
blockProcessing = true , |
|
|
int |
nInChannels = 1 , |
|
|
int |
nOutChannels = 1 |
|
) |
| |
|
inline |
◆ ~OverSampler()
template<typename T = double>
◆ GetRate()
template<typename T = double>
◆ Process()
template<typename T = double>
T OverSampler< T >::Process |
( |
T |
input, |
|
|
std::function< T(T)> |
func |
|
) |
| |
|
inline |
Over sample an input sample with a per-sample function (up-sample input -> process with function -> down-sample)
- Parameters
-
input | The audio sample to input |
std::function<double(double)> | The function that processes the audio sample at the higher sampling rate. NOTE: std::function can call malloc if you pass in captures |
- Returns
- The audio sample output
Definition at line 255 of file Oversampler.h.
◆ ProcessBlock()
template<typename T = double>
void OverSampler< T >::ProcessBlock |
( |
T ** |
inputs, |
|
|
T ** |
outputs, |
|
|
int |
nFrames, |
|
|
int |
nInChans, |
|
|
int |
nOutChans, |
|
|
BlockProcessFunc |
func |
|
) |
| |
|
inline |
Over sample an input block with a per-block function (up sample input -> process with function -> down sample)
- Parameters
-
inputs | Two-dimensional array containing the non-interleaved input buffers of audio samples for all channels |
outputs | Two-dimensional array for audio output (non-interleaved). |
nFrames | The block size for this block: number of samples per channel. |
nInChans | The number of input channels to process. Must be less or equal to the number of channels passed to the constructor |
nOutChans | The number of output channels to process. Must be less or equal to the number of channels passed to the constructor |
func | The function that processes the audio sample at the higher sampling rate. NOTE: std::function can call malloc if you pass in captures |
Definition at line 177 of file Oversampler.h.
◆ ProcessGen()
template<typename T = double>
T OverSampler< T >::ProcessGen |
( |
std::function< T()> |
genFunc | ) |
|
|
inline |
Over-sample an per-sample synthesis function.
- Parameters
-
genFunc | The function that generates the audio sample |
- Returns
- The audio sample output
Definition at line 323 of file Oversampler.h.
◆ RateToFactor()
template<typename T = double>
static EFactor OverSampler< T >::RateToFactor |
( |
int |
rate | ) |
|
|
inlinestatic |
◆ Reset()
template<typename T = double>
void OverSampler< T >::Reset |
( |
int |
blockSize = DEFAULT_BLOCK_SIZE | ) |
|
|
inline |
◆ SetOverSampling()
template<typename T = double>
void OverSampler< T >::SetOverSampling |
( |
EFactor |
factor | ) |
|
|
inline |
The documentation for this class was generated from the following file: