add some debug for audio injector wrap case

This commit is contained in:
Stephen Birarda 2016-01-26 13:10:02 -08:00
parent 81b04f2e75
commit b6f478e087

View file

@ -299,7 +299,12 @@ uint64_t AudioInjector::injectNextFrame() {
// immediately send the first two frames so the mixer can start using the audio right away
return NEXT_FRAME_DELTA_IMMEDIATELY;
} else {
return (++_nextFrame * AudioConstants::NETWORK_FRAME_USECS) - _frameTimer->nsecsElapsed() / 1000;
uint64_t untilNextFrame = (++_nextFrame * AudioConstants::NETWORK_FRAME_USECS) - _frameTimer->nsecsElapsed() / 1000;
if (untilNextFrame >= 10 * AudioConstants::NETWORK_FRAME_USECS) {
qDebug() << "AudioInjector returning delta to next frame that is very large -" << untilNextFrame;
qDebug() << "Next Frame is " << _nextFrame << "frameTimer nsecsElapsed is" << _frameTimer->nsecsElapsed();
}
return untilNextFrame;
}
}