I am trying to get the samples out of a CMSampleBufferRef and into an array of floats in order to change the pitch. I have found a method CMSampleBufferCallForEachSample in the documentation but don’t know how to use it and there are no examples or explanations. Please I have been running around in circles with this thing for a while, can anyone help?
Share
I was solving similar problem. I needed to split AAC samples from one SampleBuffer.
but callback is called only once for first sample in each sampleBuffer, even there is the array of 76 samples and CMSampleBufferGetNumSamples returning this number
i found excellent solution here (method fillMovieSampleBuffer row 283)
for documentation of CoreMedia framework check this URL