Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
Yes, the app extension sometimes reaches its memory limit in 5-10 sec after I start the recording with mic on.switch type {
case RPSampleBufferType.video:
// Handle video sample buffer
if activeAssetWriter.inputs[0].isReadyForMoreMediaData {
activeAssetWriter.inputs[0].append(buffer)
}
case RPSampleBufferType.audioApp:
// Handle audio sample buffer for app audio
if activeAssetWriter.inputs[1].isReadyForMoreMediaData {
activeAssetWriter.inputs[1].append(buffer)
}
case RPSampleBufferType.audioMic:
// Handle audio sample buffer for mic audio
if activeAssetWriter.inputs[2].isReadyForMoreMediaData {
activeAssetWriter.inputs[2].append(buffer)
}
@unknown default:
// Handle other sample buffer types
fatalError("Unknown type of sample buffer")
}I am simply writing the buffer data to AVAssetWriterInput. From the log I understood that the audio buffer queue fills up to 40mb in just 2-3 seconds that leads to this crash.