Linear or 6-point resampler, audio reverser and 16-bit to 32-bit audio converter.
More...
#include "SuperpoweredResampler.h"
|
| Resampler () |
|
| ~Resampler () |
|
int | process (short int *input, float *output, int numberOfFrames, bool reverse=false, bool highQuality=false, float rateAdd=0.0f) |
| Processes the audio. More...
|
|
int | process (short int *input, float *temp, short int *output, int numberOfFrames, bool reverse=false, bool highQuality=false, float rateAdd=0.0f) |
| Processes the audio. More...
|
|
void | reset () |
| Reset all internals. Doesn't change rate. More...
|
|
|
float | rate |
| Default: 1.0f. If rate = 1, process() is "transparent" without any effect on audio quality. More...
|
|
Linear or 6-point resampler, audio reverser and 16-bit to 32-bit audio converter.
It doesn't allocate any internal buffers and needs just a few bytes of memory.
◆ Resampler() [1/2]
Superpowered::Resampler::Resampler |
( |
| ) |
|
◆ ~Resampler()
Superpowered::Resampler::~Resampler |
( |
| ) |
|
◆ Resampler() [2/2]
Superpowered::Resampler::Resampler |
( |
const Resampler & |
| ) |
|
|
private |
◆ operator=()
◆ process() [1/2]
int Superpowered::Resampler::process |
( |
short int * |
input, |
|
|
float * |
output, |
|
|
int |
numberOfFrames, |
|
|
bool |
reverse = false , |
|
|
bool |
highQuality = false , |
|
|
float |
rateAdd = 0.0f |
|
) |
| |
Processes the audio.
- Returns
- The number of output frames.
- Parameters
-
input | Pointer to short integer numbers, 16-bit stereo interleaved input. Should be numberOfFrames * 2 + 64 big. |
output | Pointer to floating point numbers, 32-bit stereo interleaved output. Should be big enough to store the expected number of output frames and some more. |
numberOfFrames | Number of frames to process. |
reverse | If true, the output will be backwards (reverse playback). |
highQuality | Enables more sophisticated processing to reduce interpolation noise. Good for scratching for example, but not recommended for continous music playback above 0.5 rate. |
rateAdd | Changes rate smoothly during process(). Useful for scratching or super smooth rate changes. After process() rate will be changed, but may or may not be precisely equal to the desired target value. |
◆ process() [2/2]
int Superpowered::Resampler::process |
( |
short int * |
input, |
|
|
float * |
temp, |
|
|
short int * |
output, |
|
|
int |
numberOfFrames, |
|
|
bool |
reverse = false , |
|
|
bool |
highQuality = false , |
|
|
float |
rateAdd = 0.0f |
|
) |
| |
Processes the audio.
- Returns
- The number of output frames.
- Parameters
-
input | Pointer to short integer numbers, 16-bit stereo interleaved input. Should be numberOfFrames * 2 + 64 big. |
temp | Pointer to floating point numbers. Should be numberOfFrames * 2 + 64 big. |
output | Pointer to short integer numbers, 16-bit stereo interleaved output. Should be big enough to store the expected number of output frames and some more. |
numberOfFrames | Number of frames to process. |
reverse | If true, the output will be backwards (reverse playback). |
highQuality | Enables more sophisticated processing to reduce interpolation noise. Good for scratching for example, but not recommended for continous music playback above 0.5 rate. |
rateAdd | Changes rate smoothly during process(). Useful for scratching or super smooth rate changes. After process() rate will be changed, but may or may not be precisely equal to the desired target value. |
◆ reset()
void Superpowered::Resampler::reset |
( |
| ) |
|
Reset all internals. Doesn't change rate.
◆ internals
resamplerInternals* Superpowered::Resampler::internals |
|
private |
◆ rate
float Superpowered::Resampler::rate |
Default: 1.0f. If rate = 1, process() is "transparent" without any effect on audio quality.
The documentation for this class was generated from the following file:
- latest/Superpowered/SuperpoweredResampler.h