Playing Raw pcm audio data coming from NSStream
问题 I am trying to play the pcm data from NSInputStream. Can anyone provide me the right approach or code to do so. I got the Audio in StreamHasData event with following code. uint8_t bytes[self.audioStreamReadMaxLength]; UInt32 length = [audioStream readData:bytes maxLength:self.audioStreamReadMaxLength]; Now how can i play bytes audio data in iphone? 回答1: I worked on a similar problem, and I in the end solved it. Here is the basic of what I did. I am using a library for the sockets The below