AudioConfig

data class AudioConfig(val preferredLanguages: List<String> = emptyList(), val preservePitch: Boolean = true, val downmix: DownmixConfig = DownmixConfig(), val volumeCeiling: Float = 1.0f, val equalizer: EqualizerSettings = EqualizerSettings.Flat, val replayGain: ReplayGainMode = ReplayGainMode.Off, val replayGainPreampDb: Float = 0.0f, val replayGainFallbackDb: Float = 0.0f, val resampler: AudioResamplerFactory? = null, val upmix: UpmixMode = UpmixMode.Off, val matchOutputChannels: Boolean = false)

How the player handles sound: which track to pick, the pitch law, the downmix, the volume ceiling, the equaliser, ReplayGain and the resampler. A fresh player starts from these values, and the setters on KitePlayer change most of them while it plays.

Constructors

Link copied to clipboard
constructor(preferredLanguages: List<String> = emptyList(), preservePitch: Boolean = true, downmix: DownmixConfig = DownmixConfig(), volumeCeiling: Float = 1.0f, equalizer: EqualizerSettings = EqualizerSettings.Flat, replayGain: ReplayGainMode = ReplayGainMode.Off, replayGainPreampDb: Float = 0.0f, replayGainFallbackDb: Float = 0.0f, resampler: AudioResamplerFactory? = null, upmix: UpmixMode = UpmixMode.Off, matchOutputChannels: Boolean = false)

Properties

Link copied to clipboard

How multichannel audio is folded down when the device has fewer speakers.

Link copied to clipboard

The equaliser a fresh player starts at. Change it live with KitePlayer.setEqualizer.

Link copied to clipboard

Choose between two mixes of one language by the speakers that play them (#466). Off by default.

Link copied to clipboard

Preferred languages, best first, as ISO 639 codes or BCP 47 tags.

Link copied to clipboard

Play at a different rate without changing pitch. True stretches the sound in time; false plays it faster or slower like a tape, so pitch moves with the rate. The seed for KitePlayer.setPreservePitch, which can change it at runtime.

Link copied to clipboard

Whether to honour the loudness the encoder measured, and which measurement to use.

Link copied to clipboard

Applied when replayGain is on and the media carries no usable tag, in dB.

Link copied to clipboard

Added to whatever the tag asked for, in dB. The usual taste knob; 0 honours the tag exactly.

Link copied to clipboard

Replaces the engine's own rate conversion, a windowed sinc written in Kotlin. Null keeps that sinc. KiteFFmpegResampler in kiteplayer-ffmpeg runs FFmpeg's libswresample instead. A factory that throws leaves the sinc in place; see AudioResamplerFactory.

Link copied to clipboard

Whether mono or stereo audio also plays from the other speakers of a surround device. Off by default, because widening a mix is a matter of taste. See UpmixMode for the matrix.

Link copied to clipboard

The loudest KitePlayer.setVolume accepts. 1 is unity and refuses any boost, which is the default because amplifying without being asked to is not a player's decision to make.