20 #ifndef AUDIORESAMPLER_H_
21 #define AUDIORESAMPLER_H_
23 #include <com/avpkit/core/IAudioResampler.h>
24 #include <com/avpkit/core/FfmpegIncludes.h>
26 namespace com {
namespace avpkit {
namespace core
51 static AudioResampler* make(int32_t outputChannels, int32_t inputChannels,
52 int32_t outputRate, int32_t inputRate);
54 static AudioResampler* make(int32_t outputChannels, int32_t inputChannels,
55 int32_t outputRate, int32_t inputRate,
58 static AudioResampler* make(int32_t outputChannels, int32_t inputChannels,
59 int32_t outputRate, int32_t inputRate,
61 int32_t filterLen, int32_t log2PhaseCount,
73 SwrContext *swrContext;
81 int32_t mLog2PhaseCount;
virtual int resample(IAudioSamples *pOutputSamples, IAudioSamples *pInputSamples, int32_t numSamples)
Re-sample up to numSamples from inputSamples to outputSamples.
virtual int32_t getMinimumNumSamplesRequiredInOutputSamples(IAudioSamples *inSamples)
Get the minimum number of samples that must be placeable in an output set of samples in order for a r...
virtual int32_t getFilterLen()
Get the length of each filter in the resampler filter bank.
virtual double getCutoffFrequency()
What is the cuttoff frequency used?
virtual int getInputChannels()
number of channels expected in input audio.
virtual int getOutputRate()
sample rate of output audio.
virtual IAudioSamples::Format getInputFormat()
Get the sample format we expect to resample from.
virtual bool isLinear()
Are we linearly interpolating between filters?
virtual int getOutputChannels()
number of channels in output audio.
virtual int32_t getLog2PhaseCount()
Get log2(number of entries in filter bank).
virtual IAudioSamples::Format getOutputFormat()
Get the sample format we expect to resample to.
virtual int getInputRate()
sample rate expected in input audio.
Used to resample IAudioSamples to different sample rates or number of channels.
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.
WARNING: Do not use logging in this class, and do not set any static file variables to values other t...