title: Creating NSData from live audio stream
body: <p>I want to capture a part of live audio stream into a NSData file. I tried simply creating a NSData, but my application always stucks and NSData line, because source is continous. Is there any other way to create, an NSData or some array of ints from the internet radio signal? </p>
  
  <pre><code>RadioInfo *sharedRadio = [RadioInfo sharedRadio];
  NSString *program = [NSString stringWithFormat:@"%@",sharedRadio.list[value]];
  NSURL *url = [NSURL URLWithString:program];
  
  NSData *data = [NSData dataWithContentsOfURL:url];
  
  AVPlayerItem *playerItem = [AVPlayerItem playerItemWithURL:url];
  self.playerItem = [AVPlayerItem playerItemWithURL:url];
  self.player = [AVPlayer playerWithPlayerItem:playerItem];
  self.player = [AVPlayer playerWithURL:url];
  [self.player pause];
  [self.player play];
  </code></pre>