Convert audio CMSampleBuffer to MTLBuffer

213 Views Asked by At

What is the most efficient way to convert audio CMSampleBuffer buffers to MTLBuffer buffers? I would also like to efficiently as possible convert MTLBuffer buffers back to CMSampleBuffer buffers.

Do I need to first convert audio CMSampleBuffer to NSData, then use makeBuffer(bytesNoCopy pointer: UnsafeMutableRawPointer, length: Int, ...)? Or is there a more direct approach?

0

There are 0 best solutions below