Companion

object Companion

Properties

Link copied to clipboard

Extra compensation, in milliseconds, added on top of outputLatencyCompensationMs when the track is routed to SonixOutputRoute.BLUETOOTH. Default 0 leaves behaviour unchanged on every route.

Link copied to clipboard

Measured residual playback-out latency, in milliseconds, subtracted from every audibleTimeMsAtWallNanos result system-wide (ADR-021 follow-up). It is the amount the OS presentation clock still leads the truly-audible output on this device/route, over and above what AudioTrack.getTimestamp / AVAudioPlayerNode already remove.

Functions

Link copied to clipboard
suspend fun create(source: String, config: SonixPlayerConfig = SonixPlayerConfig.DEFAULT, audioSession: AudioMode = AudioMode.PLAYBACK): SonixPlayer

Create player from source with configuration.

Link copied to clipboard
fun createFromPcm(data: ByteArray, sampleRate: Int = 44100, channels: Int = 1, config: SonixPlayerConfig = SonixPlayerConfig.DEFAULT, audioSession: AudioMode = AudioMode.PLAYBACK): SonixPlayer

Create player from raw PCM data with configuration.