Most of my changes rightnow are in sipdroid/media/RtpStreamSender.java
the biggest issue was how the time and sample was calculated. For
example time was increased based on the size it was read of the PCM16
stream, so in this case, double of what time is suposed to be. Second
it didn't use the frame_size value as the timing (Will have to be
changed at multiple place to reflect the real type of value).
The part that I've ripped out is the 10 buffer input rotation defined
with : (ring+delay)%(frame_size*10). Is there an actual reason why
this is there, also delay is always set to 0, and I don't see what use
it is to actually add force delay.
Used AudioRecord.getMinBufferSize(8000,
AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT) instead of the hard coded value of
6144 for the PCM read buffer.
So rightnow, the change I made follow the frame_size set in
UserAgentProfile.java. So normally is 20ms and has to be 20ms UNLESS
we provide a ptime value in the SDP media (I couldn't figure out how
to do this correctly yet). If not some rtp stack will reject the
audio.
Things I have to do, create a configuration menu for Codec, to be able
to select ALAW/ULAW frame_size (20ms,30ms...), if possible add a low
bitrate codec (I saw some GSM java stack, never touch them), also add
support for other hz frequency for support of G722 or other codec. I
got issue with hangup not been detected and incoming call that doesn't
seem to work. Also I couldn't get video to work between my Polycom
VVX 1500 phones, so it something I want to try to get working.
Let me know if you need anything else. For the moment, I would commit
the basic fix, and work after on getting those codec menus (I've never
played with menu yet)...
Marc O.