added check before pushAudioToOutput to prevent starvecount buildup

This commit is contained in:
wangyix 2014-07-30 15:47:49 -07:00
parent 636b6d3307
commit 24be668d36
2 changed files with 5 additions and 1 deletions

View file

@ -709,7 +709,9 @@ void Audio::handleAudioInput() {
delete[] inputAudioSamples;
}
pushAudioToOutput();
if (_receivedAudioStream.getPacketReceived() > 0) {
pushAudioToOutput();
}
}
void Audio::addReceivedAudioToStream(const QByteArray& audioByteArray) {

View file

@ -108,6 +108,8 @@ public:
int getSilentFramesDropped() const { return _silentFramesDropped; }
int getOverflowCount() const { return _ringBuffer.getOverflowCount(); }
int getPacketReceived() const { return _incomingSequenceNumberStats.getNumReceived(); }
private:
void starved();