title: How do I read samples from an AudioBufferList?
body: <p>If I open an audio file with extended audio file services, using the following client data format...</p>
  
  <pre><code>AudioStreamBasicDescription audioFormat;
  memset(&amp;audioFormat, 0, sizeof(audioFormat));
  audioFormat.mSampleRate = 44100.0;
  audioFormat.mFormatID = kAudioFormatLinearPCM;
  audioFormat.mFormatFlags = kAudioFormatFlagIsBigEndian | 
                             kAudioFormatFlagIsSignedInteger | 
                             kAudioFormatFlagIsPacked;
  audioFormat.mBytesPerPacket = 4;
  audioFormat.mFramesPerPacket = 1;
  audioFormat.mChannelsPerFrame = 2;
  audioFormat.mBytesPerFrame = 4;
  audioFormat.mBitsPerChannel = 16;
  </code></pre>
  
  <p>And configure an AudioBufferList like so....</p>
  
  <pre><code>AudioBufferList bufferList;
  bufferList.mNumberBuffers = 1;
  bufferList.mBuffers[0].mDataByteSize = bufferSize;
  bufferList.mBuffers[0].mNumberChannels = audioFormat.mChannelsPerFrame;
  bufferList.mBuffers[0].mData = buffer; //malloc(sizeof(UInt8) * 1024 * audioFormat.mBytesPerPacket)
  </code></pre>
  
  <p>How, then, is the data arranged in mData? If I iterate through the data like so</p>
  
  <pre><code>for (int i = 0; i &lt; frameCount; i++) {
          UInt8 somePieceOfAudioData = buffer[i];
  }
  </code></pre>
  
  <p>then what is somePieceOfAudioData.</p>
  
  <p>Is it a sample or a frame (left and right channels together)? If it's a sample then what channel is it a sample for? If for example it's a sample from the right channel, will buffer[i + 1] be a sample for the left channel?</p>
  
  <p>Any ideas, links? Thank you!</p>