views:

8

answers:

0

i modified the AVfoundation sample code from WWDC.. the stream is working great..

but when i play audio..using AVAudioPlayer the stream freezes. with out any error messages or anything

here is the AVAdudioPlayer code..

audioPlayer = [[AVAudioPlayer alloc] initWithData:data  error:&error];
  audioPlayer.numberOfLoops = 0;

  if (audioPlayer == nil)
    NSLog([error description]);             
  else 
    [audioPlayer play];

can anyone help me resolve this issue. thanks.