I used Apple`s SpeakHere sample code. Here are my mRecordFormat:
mRecordFormat.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsPacked;
mRecordFormat.mChannelsPerFrame = 1;
mRecordFormat.mBitsPerChannel = 16;
mRecordFormat.mBytesPerPacket = mRecordFormat.mBytesPerFrame = (mRecordFormat.mBitsPerChannel / 8) * mRecordFormat.mChannelsPerFrame;
mRecordFormat.mFramesPerPacket = 1;
mRecordFormat.mSampleRate = 11025.0;
I'm recording 7 seconds, and I assume that I will receive 7 * 2 * 11025 bytes(or 7 * 11025 short) in total information. Actually I'm receiving a little more in total: 154784 instead of 154350 bytes(434 bytes more). This number vary. And why it is changing?
Could someone please explain why I'm getting more bytes then I'm expecting? Am I wrong or missing something?
BTW: I'm recording in .wav format, if this helps.