CMSampleBufferSetDataBufferFromAudioBufferList returning error 12731

不羁的心 提交于 2019-12-01 00:49:10
Karol Czaradzki

Since there is a similar question without answer all over the internet.
I managed to solve it and the recording fully works.
My problem was wrong parameter passed to CMSampleBufferCreate.
numSamples instead of 1 should be equal to numberOfFrames.

So the final call is:

CMSampleBufferCreate(kCFAllocatorDefault,NULL,false,NULL,NULL,format,
                    (CMItemCount)numberOfFrames, 1, &timing, 0, NULL, &buff);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!