| VAE - Virtual Audio Engine 1
    Small Data Driven Audio Engine | 
#include <TResamplerCosine.hpp>
| Public Member Functions | |
| ResamplerCosineTpl (uint rateIn, uint rateOut, uint maxBlock=512, uchar quality=5) | |
| ResamplerCosineTpl ()=default | |
| bool | init (uint rateIn, uint rateOut, uint maxBlock=512, uchar channels=2, uchar quality=5) | 
| setup the resampler  More... | |
| Size | process (const Buffer &in, Buffer &out) | 
| Resample function Make sure the out buffer has enough space.  More... | |
| int | getLatency () const | 
| Get the latency in samples.  More... | |
| Size | estimateNeed (const Size out) const | 
| Estimate how many samples need to be put in to get n samples out.  More... | |
| Size | estimateOut (const Size in) const | 
| bool | isInitialized () const | 
| Size | calculateBufferSize (Size in) | 
| Calculate a buffersize fit for the resampled result.  More... | |
| Static Public Member Functions | |
| static void | resample (Buffer &buffer, const uint rateOut, const uchar quality=5) | 
| Resamples the provided buffer from its sampleRate to the target rate.  More... | |
| Private Types | |
| using | uchar = unsigned char | 
| using | uint = unsigned int | 
| using | Buffer = AudioBufferTpl< T > | 
| using | Size = typename Buffer::Size | 
| Private Attributes | |
| uint | mRateIn | 
| uint | mRateOut | 
| double | mFactor = 1.0 | 
| T | mOffset = 0 | 
| T | mLastFrame [MAX_CHANNELS] | 
| Static Private Attributes | |
| static constexpr Size | MAX_CHANNELS = 32 | 
Definition at line 8 of file TResamplerCosine.hpp.
| 
 | private | 
Definition at line 11 of file TResamplerCosine.hpp.
| 
 | private | 
Definition at line 12 of file TResamplerCosine.hpp.
| 
 | private | 
Definition at line 9 of file TResamplerCosine.hpp.
| 
 | private | 
Definition at line 10 of file TResamplerCosine.hpp.
| 
 | inline | 
Definition at line 20 of file TResamplerCosine.hpp.
| 
 | default | 
| 
 | inline | 
Calculate a buffersize fit for the resampled result.
Also adds a bit of padding.
Definition at line 113 of file TResamplerCosine.hpp.
| 
 | inline | 
Estimate how many samples need to be put in to get n samples out.
Definition at line 96 of file TResamplerCosine.hpp.
| 
 | inline | 
| 
 | inline | 
Get the latency in samples.
Definition at line 89 of file TResamplerCosine.hpp.
| 
 | inline | 
setup the resampler
| rateIn | Input sample rate | 
| rateOut | Desired output samplerate | 
| maxBlock | The maximum blocksize beeing passed into process(). Only relevant when doing non float resampling to allocate space for the conversion buffers | 
| quality | Quality factor from 1-10. Higher results in better quality and higher CPU usage. Depending on implementataion may not do anything. | 
Definition at line 37 of file TResamplerCosine.hpp.
| 
 | inline | 
Definition at line 105 of file TResamplerCosine.hpp.
| 
 | inline | 
Resample function Make sure the out buffer has enough space.
Definition at line 49 of file TResamplerCosine.hpp.
| 
 | inlinestatic | 
Resamples the provided buffer from its sampleRate to the target rate.
| buffer | Audiobuffer to resample, set the rate of the buffer object | 
| rateOut | Desired output samplerate in Hz | 
| quality | Quality from 1-10 | 
Definition at line 124 of file TResamplerCosine.hpp.
| 
 | staticconstexprprivate | 
Definition at line 17 of file TResamplerCosine.hpp.
| 
 | private | 
Definition at line 15 of file TResamplerCosine.hpp.
| 
 | private | 
Definition at line 18 of file TResamplerCosine.hpp.
| 
 | private | 
Definition at line 16 of file TResamplerCosine.hpp.
| 
 | private | 
Definition at line 14 of file TResamplerCosine.hpp.
| 
 | private | 
Definition at line 14 of file TResamplerCosine.hpp.