mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUAC-427: Adjust for audio latency, compensating for underflow.
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user