mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 01:04:06 +02:00
made frames available avg window 2s; added missing _silentFramesDropped update
This commit is contained in:
parent
ecfd5c2757
commit
656131b7ee
2 changed files with 6 additions and 2 deletions
|
@ -256,6 +256,8 @@ int InboundAudioStream::writeDroppableSilentSamples(int numSilentSamples) {
|
|||
// dont reset _currentJitterBufferFrames here; we want to be able to drop further silent frames
|
||||
// without waiting for _framesAvailableStat to fill up to 10s of samples.
|
||||
_currentJitterBufferFrames -= numSilentFramesToDrop;
|
||||
_silentFramesDropped += numSilentFramesToDrop;
|
||||
|
||||
_framesAvailableStat.reset();
|
||||
}
|
||||
|
||||
|
@ -277,7 +279,7 @@ AudioStreamStats InboundAudioStream::getAudioStreamStats() const {
|
|||
streamStats._timeGapWindowAverage = _interframeTimeGapStatsForStatsPacket.getWindowAverage();
|
||||
|
||||
streamStats._framesAvailable = _ringBuffer.framesAvailable();
|
||||
streamStats._framesAvailableAverage = _currentJitterBufferFrames;
|
||||
streamStats._framesAvailableAverage = _framesAvailableStat.getAverage();
|
||||
streamStats._desiredJitterBufferFrames = _desiredJitterBufferFrames;
|
||||
streamStats._starveCount = _starveCount;
|
||||
streamStats._consecutiveNotMixedCount = _consecutiveNotMixedCount;
|
||||
|
|
|
@ -37,7 +37,9 @@ const int TIME_GAPS_FOR_JITTER_CALC_WINDOW_INTERVALS = 10;
|
|||
const int TIME_GAPS_FOR_STATS_PACKET_INTERVAL_SAMPLES = USECS_PER_SECOND / BUFFER_SEND_INTERVAL_USECS;
|
||||
const int TIME_GAPS_FOR_STATS_PACKET_WINDOW_INTERVALS = 30;
|
||||
|
||||
const int FRAMES_AVAILABLE_STAT_WINDOW_USECS = 10 * USECS_PER_SECOND;
|
||||
// this controls the window size of the time-weighted avg of frames available. Every time the window fills up,
|
||||
// _currentJitterBufferFrames is updated with the time-weighted avg and the running time-weighted avg is reset.
|
||||
const int FRAMES_AVAILABLE_STAT_WINDOW_USECS = 2 * USECS_PER_SECOND;
|
||||
|
||||
// the internal history buffer of the incoming seq stats will cover 30s to calculate
|
||||
// packet loss % over last 30s
|
||||
|
|
Loading…
Reference in a new issue