GUAC-427: Adjust for audio latency, compensating for underflow.

This commit is contained in:
Michael Jumper
2015-08-21 21:50:33 -07:00
parent de45663624
commit 193f2c676d

View File

@@ -58,8 +58,10 @@ Guacamole.AudioChannel = function() {
var now = Guacamole.AudioChannel.getTimestamp(); var now = Guacamole.AudioChannel.getTimestamp();
// If underflow is detected, reschedule new packets relative to now. // If underflow is detected, reschedule new packets relative to now.
if (next_packet_time < now) if (next_packet_time < now) {
duration += next_packet_time - now;
next_packet_time = now; next_packet_time = now;
}
// Schedule next packet // Schedule next packet
packet.play(next_packet_time); packet.play(next_packet_time);