1

I need to implement audio streaming on iPhone with latency lower than 50 millisecond .

Any ideas on how I can make it work?

I bumped into: http://cocoawithlove.com/2009/06/revisiting-old-post-streaming-and.html

But it's very important to me to know that the latency will be very low.

thanks

Oded Regev
  • 4,065
  • 2
  • 38
  • 50
  • 3
    A busy server can have that much latency in its own. If it's connected to your phone over a half-dozen internet routers and the wireless protocol, things can only get worse. AV streaming normally uses a lot of buffering to allow the client to issue output without breaks. If you absolutely need to have <50ms latency, you have a big problem! – Martin James Sep 17 '11 at 14:35
  • 1
    Latency from where to where? Latency is usually a measure of time between two testably observable events. How do you plan on measuring this? – hotpaw2 Sep 17 '11 at 14:42

1 Answers1

2

One way to minimize latency on the receiving end is to use the RemoteIO Audio Unit with very short buffers, and feed it from raw PCM audio or a decompressor for an audio format that requires extremely low computational complexity to decode, as well as small packets.

You pretty much need complete control over the entire network source and path, including hand picking all the equipment, as any router or access point can completely destroy latency by buffeting packets or prioritizing other traffic, etc.

You probably want to use UDP for the IP protocol, with a packet size tuned to your network equipment and to the audio buffer size.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153