07-13-2011 03:49 PM
I'm developing a SIP client from scratch, and I'm now at a point where I can register and initiate a call. It all kind of works, but I'm experiencing a pretty huge delay in audio playback (1-2 seconds). I'm using 8khz mono pcm playback (and I'm writing the wav header myself), and I encode/decode to/from PCMA myself.
I'm testing on a Torch and a Curve and the results are pretty much the same.
I've searched the forum and I found that I'm not exactly the only one with this problem.
I'm wondering if people have progressed in this area, and I'm looking for new ideas to try out.
I've done test to increase the sampling rate, but that didn't really seem to make a difference (I didn't do the actual upsampling yet, so although the sound is pitched and choppy, the delay seems about the same with the delay increasing to even higher levels over time). Did anyone have any luck reducing latency with upsampling?
I've also thought about writing the incoming audio earlier than requested. For example: in the read(b,off,len) where off = 32000, actually write to for example off=16000. A long shot maybe, and of course a very dirty out-of-spec hack, but perhaps this could work. Anyone tried this yet?
Any other ideas?
07-13-2011 04:25 PM
07-14-2011 03:04 AM
Makes sense. It would have been a bug if it wouldn't size the buffer according to sampling rate.
Good news that OS7 will have a fix!
fgVoip claim they've solved the problem though. Did anyone try their solution? Did they really manage to reduce latency to usable levels?
07-14-2011 03:14 AM
07-14-2011 03:25 AM
Well that is good news I suppose.
fgVoip claim to have solved the problem. I couldn't get their SIP client to work at all though. Can anyone confirm that they really managed to reduce latency?
07-14-2011 03:30 PM
07-15-2011 04:05 PM
I saw on the Linphone site that amr is the only way to do real time audio on BB. Not sure I believe that, but who knows... So far I haven't been able to get working AMR-NB support on our Asterisk server, but I'll be very interested to hear about your results with AMR
07-15-2011 06:06 PM
Just a few questions: Is there any way to have low latency audio playback on blackberry besides streaming like we do now? For example short audio clips? If so, perhaps some kludgy workaround would be possible by creating such audio clips on the fly and playing them back in a queue.
07-16-2011 01:41 AM