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 {@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.