|
VAE - Virtual Audio Engine 1
Small Data Driven Audio Engine
|
#include <TResamplerHold.hpp>
Public Member Functions | |
| ResamplerHoldTpl (uint rateIn, uint rateOut, uint maxBlock=512, uchar quality=5) | |
| bool | init (uint rateIn, uint rateOut, uint maxBlock=512, 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 |
| Estimate how many sample will be emitted in the next step. More... | |
| bool | isInitialized () const |
| Size | calculateBufferSize (Size initialSize) |
| 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 |
Definition at line 8 of file TResamplerHold.hpp.
|
private |
Definition at line 11 of file TResamplerHold.hpp.
|
private |
Definition at line 12 of file TResamplerHold.hpp.
|
private |
Definition at line 9 of file TResamplerHold.hpp.
|
private |
Definition at line 10 of file TResamplerHold.hpp.
|
inline |
Definition at line 17 of file TResamplerHold.hpp.
|
inline |
Calculate a buffersize fit for the resampled result.
Also adds a bit of padding.
Definition at line 86 of file TResamplerHold.hpp.
|
inline |
Estimate how many samples need to be put in to get n samples out.
Definition at line 67 of file TResamplerHold.hpp.
|
inline |
Estimate how many sample will be emitted in the next step.
Definition at line 74 of file TResamplerHold.hpp.
|
inline |
|
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 31 of file TResamplerHold.hpp.
|
inline |
Definition at line 78 of file TResamplerHold.hpp.
|
inline |
Resample function Make sure the out buffer has enough space.
Definition at line 42 of file TResamplerHold.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 97 of file TResamplerHold.hpp.
|
private |
Definition at line 14 of file TResamplerHold.hpp.
|
private |
Definition at line 13 of file TResamplerHold.hpp.
|
private |
Definition at line 13 of file TResamplerHold.hpp.