20 #ifndef IAUDIORESAMPLER_H_
21 #define IAUDIORESAMPLER_H_
23 #include <com/avpkit/ferry/RefCounted.h>
24 #include <com/avpkit/core/AVPKit.h>
25 #include <com/avpkit/core/IAudioSamples.h>
27 namespace com {
namespace avpkit {
namespace core
87 int32_t numSamples)=0;
109 static IAudioResampler* make(int32_t outputChannels, int32_t inputChannels,
110 int32_t outputRate, int32_t inputRate);
176 static IAudioResampler* make(int32_t outputChannels, int32_t inputChannels,
177 int32_t outputRate, int32_t inputRate,
206 static IAudioResampler* make(int32_t outputChannels, int32_t inputChannels,
207 int32_t outputRate, int32_t inputRate,
209 int32_t filterLen, int32_t log2PhaseCount,
210 bool isLinear,
double cutoffFrequency);
243 int32_t numSamples)=0;
Used to resample IAudioSamples to different sample rates or number of channels.
virtual int getInputRate()=0
sample rate expected in input audio.
virtual int getInputChannels()=0
number of channels expected in input audio.
virtual IAudioSamples::Format getOutputFormat()=0
Get the sample format we expect to resample to.
virtual int32_t getFilterLen()=0
Get the length of each filter in the resampler filter bank.
virtual IAudioSamples::Format getInputFormat()=0
Get the sample format we expect to resample from.
virtual int32_t getLog2PhaseCount()=0
Get log2(number of entries in filter bank).
virtual bool isLinear()=0
Are we linearly interpolating between filters?
virtual double getCutoffFrequency()=0
What is the cuttoff frequency used?
virtual int resample(IAudioSamples *outputSamples, IAudioSamples *inputSamples, int32_t numSamples)=0
Re-sample up to numSamples from inputSamples to outputSamples.
virtual int getOutputChannels()=0
number of channels in output audio.
virtual int32_t getMinimumNumSamplesRequiredInOutputSamples(IAudioSamples *inSamples)=0
Get the minimum number of samples that must be placeable in an output set of samples in order for a r...
virtual int32_t getMinimumNumSamplesRequiredInOutputSamples(int32_t numSamples)=0
Get the minimum number of samples that must be placeable in an output set of samples in order for a r...
virtual int getOutputRate()=0
sample rate of output audio.
A set of raw (decoded) samples, plus a timestamp for when to play those samples relative to other ite...
Format
The format we use to represent audio.
Parent of all Ferry objects – it mains reference counts in native code.
WARNING: Do not use logging in this class, and do not set any static file variables to values other t...