Initializes a new AudioResampler.
The sample rate of the input audio data (in Hz).
The desired sample rate of the output audio data (in Hz).
The number of audio channels (e.g., 1 for mono, 2 for stereo). Defaults to 1.
The quality setting for the resampler. Defaults to
AudioResamplerQuality.MEDIUM
.
Flush any remaining audio data through the resampler and retrieve the resampled data.
Push audio data into the resampler and retrieve any available resampled data.
This method accepts audio data, resamples it according to the configured input and output rates, and returns any resampled data that is available after processing the input.
The audio frame to resample
A list of AudioFrame objects containing the resampled audio data. The list may be empty if no output data is available yet.
AudioResampler provides functionality to resample audio data from an input sample rate to an output sample rate using the Sox resampling library. It supports multiple channels and configurable resampling quality.