|
AVPKit
|


Public Member Functions | |
| virtual int | getOutputChannels () |
| number of channels in output audio. More... | |
| virtual int | getOutputRate () |
| sample rate of output audio. More... | |
| virtual int | getInputChannels () |
| number of channels expected in input audio. More... | |
| virtual int | getInputRate () |
| sample rate expected in input audio. More... | |
| virtual int | resample (IAudioSamples *pOutputSamples, IAudioSamples *pInputSamples, int32_t numSamples) |
| Re-sample up to numSamples from inputSamples to outputSamples. More... | |
| virtual IAudioSamples::Format | getOutputFormat () |
| Get the sample format we expect to resample to. More... | |
| virtual IAudioSamples::Format | getInputFormat () |
| Get the sample format we expect to resample from. More... | |
| virtual int32_t | getFilterLen () |
| Get the length of each filter in the resampler filter bank. More... | |
| virtual int32_t | getLog2PhaseCount () |
| Get log2(number of entries in filter bank). More... | |
| virtual bool | isLinear () |
| Are we linearly interpolating between filters? More... | |
| virtual double | getCutoffFrequency () |
| What is the cuttoff frequency used? More... | |
| 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 resample with this resampler to succeed. More... | |
| virtual int32_t | getMinimumNumSamplesRequiredInOutputSamples (int32_t numSamples) |
| Get the minimum number of samples that must be placeable in an output set of samples in order for a resample with this resampler to succeed. More... | |
Public Member Functions inherited from com::avpkit::ferry::RefCounted | |
| virtual int32_t | acquire () |
| Internal Only. More... | |
| virtual int32_t | release () |
| Internal Only. More... | |
| virtual RefCounted * | copyReference () |
| Create a new Java object that refers to the same native object. More... | |
| virtual int32_t | getCurrentRefCount () |
| Return the current reference count on this object. More... | |
| void | setJavaAllocator (void *allocator) |
| This method is public but not part of the standard API. More... | |
| void * | getJavaAllocator () |
| This method is public but not part of the standard API. More... | |
Static Public Member Functions | |
| static AudioResampler * | make (int32_t outputChannels, int32_t inputChannels, int32_t outputRate, int32_t inputRate) |
| static AudioResampler * | make (int32_t outputChannels, int32_t inputChannels, int32_t outputRate, int32_t inputRate, IAudioSamples::Format outputFmt, IAudioSamples::Format inputFmt) |
| static AudioResampler * | make (int32_t outputChannels, int32_t inputChannels, int32_t outputRate, int32_t inputRate, IAudioSamples::Format outputFmt, IAudioSamples::Format inputFmt, int32_t filterLen, int32_t log2PhaseCount, bool isLinear, double cutoff) |
Static Public Member Functions inherited from com::avpkit::core::IAudioResampler | |
| static IAudioResampler * | make (int32_t outputChannels, int32_t inputChannels, int32_t outputRate, int32_t inputRate) |
| Create a new IAudioResampler object. More... | |
| static IAudioResampler * | make (int32_t outputChannels, int32_t inputChannels, int32_t outputRate, int32_t inputRate, IAudioSamples::Format outputFmt, IAudioSamples::Format inputFmt) |
| Create a new IAudioResampler object. More... | |
| static IAudioResampler * | make (int32_t outputChannels, int32_t inputChannels, int32_t outputRate, int32_t inputRate, IAudioSamples::Format outputFmt, IAudioSamples::Format inputFmt, int32_t filterLen, int32_t log2PhaseCount, bool isLinear, double cutoffFrequency) |
| Create a new IAudioResampler object. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from com::avpkit::ferry::RefCounted | |
| virtual void | destroy () |
| This method is called by RefCounted objects when their Ref Count reaches zero and they are about to be destroyed. | |
Protected Attributes inherited from com::avpkit::ferry::RefCounted | |
| AtomicInteger * | mRefCount |
| This is the internal reference count, represented as an AtomicInteger to make sure it is thread safe. | |
| void * | mAllocator |
| Not part of public API. | |
Definition at line 29 of file AudioResampler.h.
|
virtual |
What is the cuttoff frequency used?
Implements com::avpkit::core::IAudioResampler.
Definition at line 472 of file AudioResampler.cpp.
|
virtual |
Get the length of each filter in the resampler filter bank.
Implements com::avpkit::core::IAudioResampler.
Definition at line 454 of file AudioResampler.cpp.
|
virtual |
number of channels expected in input audio.
Implements com::avpkit::core::IAudioResampler.
Definition at line 179 of file AudioResampler.cpp.
|
virtual |
Get the sample format we expect to resample from.
Implements com::avpkit::core::IAudioResampler.
Definition at line 448 of file AudioResampler.cpp.
|
virtual |
sample rate expected in input audio.
Implements com::avpkit::core::IAudioResampler.
Definition at line 186 of file AudioResampler.cpp.
|
virtual |
Get log2(number of entries in filter bank).
Implements com::avpkit::core::IAudioResampler.
Definition at line 460 of file AudioResampler.cpp.
|
virtual |
Get the minimum number of samples that must be placeable in an output set of samples in order for a resample with this resampler to succeed.
| inSamples | The input samples that will be passed to resample. |
Implements com::avpkit::core::IAudioResampler.
Definition at line 193 of file AudioResampler.cpp.
References com::avpkit::core::IAudioSamples::getChannels(), com::avpkit::core::IAudioSamples::getFormat(), com::avpkit::core::IAudioSamples::getNumSamples(), com::avpkit::core::IAudioSamples::getSampleRate(), and com::avpkit::core::IAudioSamples::isComplete().
|
virtual |
Get the minimum number of samples that must be placeable in an output set of samples in order for a resample with this resampler to succeed.
| numSamples | The number of input samples. |
Implements com::avpkit::core::IAudioResampler.
Definition at line 232 of file AudioResampler.cpp.
|
virtual |
number of channels in output audio.
Implements com::avpkit::core::IAudioResampler.
Definition at line 165 of file AudioResampler.cpp.
|
virtual |
Get the sample format we expect to resample to.
Implements com::avpkit::core::IAudioResampler.
Definition at line 442 of file AudioResampler.cpp.
|
virtual |
sample rate of output audio.
Implements com::avpkit::core::IAudioResampler.
Definition at line 172 of file AudioResampler.cpp.
|
virtual |
Are we linearly interpolating between filters?
Implements com::avpkit::core::IAudioResampler.
Definition at line 466 of file AudioResampler.cpp.
|
virtual |
Re-sample up to numSamples from inputSamples to outputSamples.
This function re-samples the audio in inputSamples to have the same number of channels, and the same sample rate, as this IAudioResampler was initialized with.
Caller is responsible for making sure that the IAudioSamples object passed in has enough space. This object requires space for an additional 16-samples * output-channels per IAudioSamples passed in.
If the
is not large enough to fit the required resamples, then the IAudioResampler will attempt to allocate a new output buffer and override the buffer set on
. To ensure you have enough space in your output buffer, use the getMinimumNumSamplesRequiredInOutputSamples(int) method.
| outputSamples | [out] The sample buffer we output to. |
| inputSamples | [in] The samples we're going to re-sample. |
| numSamples | [in] The number of samples from inputSamples to use. if 0, this defaults to inputSamples.getNumSamples(). |
Implements com::avpkit::core::IAudioResampler.
Definition at line 278 of file AudioResampler.cpp.
References com::avpkit::core::AudioSamples::ensureCapacity(), com::avpkit::core::IAudioSamples::findSampleBitDepth(), com::avpkit::core::AudioSamples::getChannels(), com::avpkit::core::AudioSamples::getFormat(), com::avpkit::core::AudioSamples::getMaxBufferSize(), com::avpkit::core::AudioSamples::getNumSamples(), com::avpkit::core::AudioSamples::getPts(), com::avpkit::core::AudioSamples::getSampleBitDepth(), com::avpkit::core::AudioSamples::getSampleRate(), com::avpkit::core::AudioSamples::isComplete(), com::avpkit::core::Global::NO_PTS, com::avpkit::core::IAudioSamples::samplesToDefaultPts(), and com::avpkit::core::AudioSamples::setComplete().