title: Playing audio from a continuous stream of data (iOS)
body: <p>Been banging my head against this problem all morning.</p>
  
  <p>I have setup a connection to a datasource which returns audio data (It is a recording device, so there is no set length on the data. the data just streams in. Like, if you would open a stream to a radio)</p>
  
  <p>and I have managed to receive all the packets of data in my code. Now I just need to play it. I want to play the data that is coming in, so I do not want to queue a few minutes or anything, I want to use the data I am recieving at that exact moment and play it.</p>
  
  <p>Now I been searching all morning finding different examples but none were really layed out.</p>
  
  <p>in the</p>
  
  <ul>
  <li>(void)connection:(NSURLConnection <em>)connection didReceiveData:(NSData</em>)data {</li>
  </ul>
  
  <p>function, the "data" package is the audio package. I tried streaming it with AVPlayer, MFVideoPlayer but nothing has worked for me so far. Also tried looking at mattgallagher's Audiostreamer but still was unable to achieve it.</p>
  
  <p>Anyone here can help, has some (preferably) working examples? </p>