title: AudioToolbox to play nsdata in download
body: <p>I'm trying to play audio with audiotoolbox in xcode. I search for this but the documentation is too little. I want play nsdata while i download it from internet. 
  I look this link: <a href="http://www.cocoawithlove.com/2008/09/streaming-and-playing-live-mp3-stream.html" rel="nofollow">http://www.cocoawithlove.com/2008/09/streaming-and-playing-live-mp3-stream.html</a>
  and the apple developer documentation but i can't understand what i have to do to cast nsdata (that is not complete because it is in download) in data that audiotoolbox can read.
  With apple documentation i understand the strutture the i must allocate:</p>
  
  <pre><code>typedef struct MyAQStruct {
      AudioFileID                     mAudioFile;
      AudioStreamBasicDescription     mDataFormat;
      AudioQueueRef                   mQueue;
      AudioQueueBufferRef             mBuffers[kNumberBuffers];
      SInt64                          mCurrentPacket;
      UInt32                          mNumPacketsToRead;
      AudioStreamPacketDescription    *mPacketDescs;
      bool                            mDone;
  }myAQStruct;
  </code></pre>
  
  <p>and the callback function the i have to call for play, but which of the variabile in this struct rapresent the data? maybe i think audiostreambasicdescription. or is audiofileid?
  And how can i cast nsdata into this type?</p>