I have this kotlin function, but I can't seem to b...
# multiplatform
l
I have this kotlin function, but I can't seem to be able to pass CMSampleBuffer from replay kit into it. Does anyone have a suggestion as to what I am doing wrong?
Copy code
@OptIn(ExperimentalForeignApi::class)
    fun processSample(sampleBuffer: CMSampleBufferRef?, sampleType: Long, error: NSError?) {
        if (error != null) {
            println(error.localizedDescription())
        }
        Logger.i { "Processing sample" }
        when (sampleType) {
            RPSampleBufferTypeVideo -> addSample(sampleBuffer, videoWriterInput)
            RPSampleBufferTypeAudioApp -> addSample(sampleBuffer, applicationAudioWriterInput)
            RPSampleBufferTypeAudioMic -> addSample(sampleBuffer, microphoneAudioWriterInput)
        }
    }