GUAC-427: Adjust for audio latency, compensating for underflow.
This commit is contained in:
1 parent
de45663624
commit
193f2c676d
1 file changed
+3
-1
@@ -58,8 +58,10 @@ Guacamole.AudioChannel = function() {
|
||||
var now = Guacamole.AudioChannel.getTimestamp();
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
// Schedule next packet
|
||||
packet.play(next_packet_time);
|
||||
|
||||
Reference in new issue
Block a user