AudioResamplerFactory

fun interface AudioResamplerFactory

Makes an AudioResampler for one pair of rates. Set it in AudioConfig.resampler.

The engine asks only when the two rates differ, and asks again after a format change. The playback speed never changes the rates: the tempo stage after the resampler applies it.

When create throws, the engine keeps its own resampler for that stream, stops asking for the rest of the player's life, and reports PlaybackWarning.ResamplerUnavailable once. A factory with no implementation on one platform may throw there.

Functions

Link copied to clipboard
abstract fun create(inputRate: Int, outputRate: Int, channels: Int): AudioResampler

A resampler from inputRate to outputRate for channels interleaved channels.