title: I just don't get AudioFileReadPackets
body: <p>I've tried to write the smallest chunk of code to narrow down a problem. It's now just a few lines and it doesn't work, which makes it pretty clear that I have a fundamental misunderstanding of how to use AudioFileReadPackets. I've read the docs and other examples online, and apparently I'm just not getting. Could you explain it to me?</p>
  
  <p>Here's what this block should do: I've previously opened a file. I want to read just one packet - the first one of the file - and then print it. But it crashes on the AudioFileReadPackets line:</p>
  
  <pre><code>    AudioFileID mAudioFile2; 
      AudioFileOpenURL (audioFileURL, 0x01, 0, &amp;mAudioFile2);
      UInt32 *audioData2 = (UInt32 *)malloc(sizeof(UInt32) * 1);
      AudioFileReadPackets(mAudioFile2, false, NULL, NULL, 0, (UInt32*)1, audioData2);
      NSLog(@"first packet:%i",audioData2[0]);
  </code></pre>
  
  <p>(For clarity, I've stripped out all error handling.)</p>
  
  <p>It's the AFRP line that crashes out. </p>
  
  <p>(I understand that the third and fourth argument are useful, and in my "real" code, I use them, but they're not required, right? So NULL in this case should work, right?) So then what's going on?</p>
  
  <p>Any guidance would be much appreciated.</p>
  
  <p>Thanks.</p>