package com.tsmobile.app.voice

/** Contract for the Go-to-Kotlin mixed PCM callback. */
object MixedPcmFrame {
    const val SAMPLE_RATE = 48_000
    const val CHANNELS = 2
    const val SAMPLES_PER_CHANNEL = 960
    const val SAMPLES_PER_FRAME = SAMPLES_PER_CHANNEL * CHANNELS
    const val BYTES_PER_SAMPLE = 2
    const val BYTES_PER_FRAME = SAMPLES_PER_FRAME * BYTES_PER_SAMPLE

    fun isValid(pcm: ByteArray): Boolean = pcm.size == BYTES_PER_FRAME
}
