it looks like you can get ASBD like this:
sampleBuffer-> CMSampleBufferGetFormatDescription -> CMAudioFormatDescriptionGetStreamBasicDescription
then ASBD will detail the frame sizes if it is compressed, endianness, etc.
To demonstrate this (without error checking) and get the sampling rate:
CMSampleBufferRef cmSampleBuffer = ...; CMFormatDescriptionRef formatDescription = CMSampleBufferGetFormatDescription(cmSampleBuffer); const AudioStreamBasicDescription* const asbd = CMAudioFormatDescriptionGetStreamBasicDescription(formatDescription); double sampleRate = asbd->mSampleRate;
source share