NCKitPcmFormat
Describes PCM layout for NCKitStreamProcessor.
APIโ
Kotlin
data class NCKitPcmFormat(
val sampleRate: Int,
val channelCount: Int,
)
Usageโ
Kotlin
import com.fiveexceptions.nckit.NCKitPcmFormat
val format = NCKitPcmFormat(sampleRate = 48_000, channelCount = 1)
stream.prepare(format)
val frames = stream.process(micSamples, format)
Use the same NCKitPcmFormat as your AudioRecord configuration. The stream processor resamples and downmixes to 48 kHz mono when needed.
On iOS, pass AVAudioFormat to NCKitStreamProcessor.prepare(inputFormat:) โ see How to Use.