views:

125

answers:

1

Hi, I have developed a trivial example application leveraging the example CFNetwork code listed here,

http://dev.im.ethz.ch/wiki/Socket_communication_on_the_iPhone

and combined it with the SpeakHere example on the apple developer site. Using this I have managed a very, very crude mechanism to stream audio to my server. It works surprisingly well over wifi, but hangs/bombs out over the 3g network. I had hoped that 3g/wifi would be transparent with respect to this issue but that doesn't seem to be the case. Is there any documentation regarding salient differences between these two?

+1  A: 

3G very likely has much longer latency and much more latency variation than wifi. So you should be looking into auto-tuning your jitter buffer to handle latency spikes.

Andrew McGregor
is this in reference to Asterisk/Freeswitch, or a more general issue which I could deal with in my iPhone code? I'm not actually doing VoIP so if it's the former I'm not sure how I'd go about that.
blackkettle
This is a general issue with streaming over wireless networks; they're not as consistent as wired networks, and as it happens cellular is less consistent than wifi.
Andrew McGregor
thanks again for the feedback. i wonder if just using the asyncsocket library would be sufficient to abstract this away so that i dont have to think about it. that seems to be the most widely recommended approach. i also noticed that by turning down the number of expected bytes to read on the server side, the situation significantly improves. am i correct in assuming that this is what you are referring to? sorry if these are still silly questions, im not yet 100% sure what side to focus my efforts on.
blackkettle