the problem I am reporting is probably a bug in the VoIP Audio Services plugin, as distributed in the Plugin API pack.
The iLBC codec standard defines two possible modes of the codec: 20 ms (15200 b/s), and 30 ms (13330 b/s). The first mode produces 38-byte frames, the second mode produces 50-byte frames.
The first bug: The VoIP Audio Services API defines a class named CVoIPILBCEncoderIntfc, which has functions SetMode() and GetMode(), that should be able to set one of these modes. The default mode is 20 ms. However, you cannot switch the encoder to the 30 ms mode using the function SetMode(). Even if you execute
the encoder will stay in the 20-ms mode and will produce 38-byte packets.
There is a workaround for this problem, namely execution of
This will finally force the encoder into the 30-ms mode, and it will start producing 50-byte packets. However, the call
will still result in CVoIPFormatIntfc::EiLBC20mSecFrame, as if nothing happened.
OK, now comes the second bug, which is much more serious, since it has no workaround. The decoder thread (Downlink) will immediately crash with USER 23 code, when it is asked to decode an incoming 30 ms iLBC frame. This frame is longer (50 bytes) than the 20 ms frame (38 bytes), and it seems that the Decoder cannot reset itself to the 30 ms mode.
The problem is that you cannot reset the BitRate of the Decoder manually to 13330. An attempt to do this leads to immediate freezing of the application. It therefore seems that the iLBC implementation within VoIP Audio Services, as produced by Nokia, is not very good.
I have tested this on Nokia N90. Nokia E51 seems to be even worse; at the very moment when you try to play the first 30-ms frame in the Downlink, the phone restarts itself.
A not-just-rhetorical question: How are we, 3rd party developers, supposed to develop VoIP applications if such a critical component of the OS is flawed?
I have found many more bugs in the VoIP Audio Services API, but these are the "showstoppers". If anyone from Nokia is willing to co-operate with me on this, I will point out many more bugs.