The value being passed into InboundAudioStream::writeDroppableSilentFrames(int silentFrames) is the number of silent samples (480 for stereo), not the number of silent frames (240 for stereo). The code then doubles this number for stereo to calculate the number of silent samples.
The result is that too much silence is added. However, because silence is only added if the jitter buffer is less than its desirable size, typically the extra silence will be discarded (dropped) and not written.
The value being passed into
InboundAudioStream::writeDroppableSilentFrames(int silentFrames)
is the number of silent samples (480 for stereo), not the number of silent frames (240 for stereo). The code then doubles this number for stereo to calculate the number of silent samples.The result is that too much silence is added. However, because silence is only added if the jitter buffer is less than its desirable size, typically the extra silence will be discarded (dropped) and not written.
A benign bug but confusing code.