标签: ios swift metal cmsamplebuffer mtlbuffer
将音频CMSampleBuffer缓冲区转换为MTLBuffer缓冲区的最有效方法是什么?我还希望尽可能有效地将MTLBuffer缓冲区转换回CMSampleBuffer个缓冲区。
CMSampleBuffer
MTLBuffer
我是否需要先将音频CMSampleBuffer转换为NSData,然后使用makeBuffer(bytesNoCopy pointer: UnsafeMutableRawPointer, length: Int, ...)?还是有更直接的方法?
makeBuffer(bytesNoCopy pointer: UnsafeMutableRawPointer, length: Int, ...)