ape  0.5.0
Audio Programming Environment
Classes | Public Member Functions | List of all members
ape::RealSourceResampler< T > Class Template Reference

A real-time variably resampled view on a buffer, that wraps around. Capable of producing a batched, resampled slice of audio.

See also
AudioFile
More...

#include <resampling.h>

Public Member Functions

 RealSourceResampler (umatrix< const T > data)
 Construct the resampler from a umatrix More...
 
umatrix< const T > produce (std::size_t frames, double factor=1)
 Produce the next buffer of samples. More...
 
template<typename Func >
auto produce (std::size_t frames, Func &&f, double factor=1)
 Produce a buffer with a inlined callback for each frame with the following signature: void(size_t frameNumber, const std::vector<T>& channelValues); More...
 

Detailed Description

template<typename T>
class ape::RealSourceResampler< T >

A real-time variably resampled view on a buffer, that wraps around. Capable of producing a batched, resampled slice of audio.

See also
AudioFile

Constructor & Destructor Documentation

◆ RealSourceResampler()

template<typename T >
ape::RealSourceResampler< T >::RealSourceResampler ( umatrix< const T >  data)
inline

Construct the resampler from a umatrix

Member Function Documentation

◆ produce() [1/2]

template<typename T >
umatrix<const T> ape::RealSourceResampler< T >::produce ( std::size_t  frames,
double  factor = 1 
)
inline

Produce the next buffer of samples.

Parameters
framesHow many samples to produce
factorThe resampling factor

◆ produce() [2/2]

template<typename T >
template<typename Func >
auto ape::RealSourceResampler< T >::produce ( std::size_t  frames,
Func &&  f,
double  factor = 1 
)
inline

Produce a buffer with a inlined callback for each frame with the following signature: void(size_t frameNumber, const std::vector<T>& channelValues);


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