OpenShot Library | libopenshot
0.4.0
|
This class is used to resample audio data for many sequential frames. More...
#include <AudioResampler.h>
Public Member Functions | |
AudioResampler (int numChannels=2) | |
Default constructor. More... | |
juce::AudioBuffer< float > * | GetResampledBuffer () |
Get the resampled audio buffer. More... | |
void | SetBuffer (juce::AudioBuffer< float > *new_buffer, double ratio) |
Sets the audio buffer and key settings. More... | |
void | SetBuffer (juce::AudioBuffer< float > *new_buffer, double sample_rate, double new_sample_rate) |
Sets the audio buffer and key settings. More... | |
~AudioResampler () | |
Destructor. More... | |
This class is used to resample audio data for many sequential frames.
It maintains some data from the last call to GetResampledBuffer(), so there are no pops and clicks between frames.
Definition at line 30 of file AudioResampler.h.
AudioResampler::AudioResampler | ( | int | numChannels = 2 | ) |
Default constructor.
Definition at line 19 of file AudioResampler.cpp.
AudioResampler::~AudioResampler | ( | ) |
Destructor.
Definition at line 48 of file AudioResampler.cpp.
juce::AudioBuffer< float > * AudioResampler::GetResampledBuffer | ( | ) |
Get the resampled audio buffer.
Definition at line 106 of file AudioResampler.cpp.
void AudioResampler::SetBuffer | ( | juce::AudioBuffer< float > * | new_buffer, |
double | ratio | ||
) |
Sets the audio buffer and key settings.
new_buffer | The buffer of audio samples needing to be resampled |
ratio | The multiplier that needs to be applied to the sample rate (this is how resampling happens) |
Definition at line 75 of file AudioResampler.cpp.
void AudioResampler::SetBuffer | ( | juce::AudioBuffer< float > * | new_buffer, |
double | sample_rate, | ||
double | new_sample_rate | ||
) |
Sets the audio buffer and key settings.
new_buffer | The buffer of audio samples needing to be resampled |
sample_rate | The original sample rate of the buffered samples |
new_sample_rate | The requested sample rate you need |
Definition at line 60 of file AudioResampler.cpp.