Посмотрите на ExtAudioFile. Вот грубый пример того, как использовать его для чтения целочисленных образцов:
-(void)setupStreamReader
{
CAStreamBasicDescription dstFormat, srcFormat;
UInt32 sizeZ = sizeof(srcFormat);
SInt64 sizeN = 0;
UInt32 sizeofN = sizeof(sizeN);
ExtAudioFileGetProperty(file, kExtAudioFileProperty_FileDataFormat, &sizeZ, &srcFormat);
ExtAudioFileGetProperty(file, kExtAudioFileProperty_FileLengthFrames, &sizeofN, &sizeN);
size = sizeN*4;
dstFormat.mSampleRate = 44100; // set sample rate
dstFormat.mFormatID = kAudioFormatLinearPCM;
dstFormat.mChannelsPerFrame = 2;
dstFormat.mBitsPerChannel = 16;
dstFormat.mBytesPerPacket = dstFormat.mBytesPerFrame = 2 * dstFormat.mChannelsPerFrame;
dstFormat.mFramesPerPacket = 1;
dstFormat.mFormatFlags = kLinearPCMFormatFlagIsPacked | kLinearPCMFormatFlagIsSignedInteger; // little-endian
sizeZ = sizeof(dstFormat);
ExtAudioFileSetProperty(file, kExtAudioFileProperty_ClientDataFormat, sizeZ, &dstFormat);
}
И затем это, чтобы получить фактический массив коротких целых чисел
-(void)getBytes:(short*)buffer range:(NSRange)range
{
SInt64 off = range.location/4;
ExtAudioFileSeek(file, off);
AudioBufferList fillBufList;
fillBufList.mNumberBuffers = 1;
fillBufList.mBuffers[0].mNumberChannels = 2;
fillBufList.mBuffers[0].mDataByteSize = range.length;
fillBufList.mBuffers[0].mData = buffer;
UInt32 frames = range.length/2;
ExtAudioFileRead(file, &frames, &fillBufList);
}
Файл - это ExtAudioFileRef, объявленный в заголовке.