This function re-samples the audio in inputSamples to have the same number of channels, and the same sample rate, as this {@link 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 {@link IAudioSamples} passed in.
If the {@code outputSamples} is not large enough to fit the required resamples, then the {@link IAudioResampler} will attempt to allocate a new output buffer and override the buffer set on {@code outputSamples}. To ensure you have enough space in your output buffer, use the {@link #getMinimumNumSamplesRequiredInOutputSamples(int)} method.
@param outputSamples [out] The sample buffer we output to. @param inputSamples [in] The samples we're going to re-sample. @param numSamples [in] The number of samples from inputSamples to use. if 0, this defaults to inputSamples.getNumSamples(). @return Number of samples written to outputSamples, or <0 on error.src
.This is a double value to allow successive resampling of data blocks with non integer resampling factors. Note that to the left of srcOff there must be at least getWingSize more samples in the src buffer, otherwise an ArrayIndexOutOfBoundsException will be thrown.
@param length number of target samples to calculate.Note that the size of the src buffer must exceed at least getWinSize more samples than the stopping index which is srcOff + length / factor.
@param factor target rate divided by source rate
@return the offset in src which would be the new offsetof a successive block resampling operation
|
|
|
|
|
|
|
|
|
|
|
|
|
|