From a3dd959dc41c0aafcaeb8f17694741b5f7ab4e48 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 30 Sep 2015 17:11:54 -0700 Subject: [PATCH] GUAC-1354: Do not recalculate max latency using packet duration. Audio packet duration will ALWAYS be roughly the same due to the max blob size. --- guacamole-common-js/src/main/webapp/modules/AudioPlayer.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/guacamole-common-js/src/main/webapp/modules/AudioPlayer.js b/guacamole-common-js/src/main/webapp/modules/AudioPlayer.js index 98a3592aa..938c04318 100644 --- a/guacamole-common-js/src/main/webapp/modules/AudioPlayer.js +++ b/guacamole-common-js/src/main/webapp/modules/AudioPlayer.js @@ -183,7 +183,7 @@ Guacamole.RawAudioPlayer = function RawAudioPlayer(stream, mimetype) { /** * The maximum amount of latency to allow between the buffered data stream * and the playback position, in seconds. Initially, this is set to - * roughly one third of a second, but it will be recalculated dynamically. + * roughly one third of a second. * * @private * @type Number @@ -199,9 +199,6 @@ Guacamole.RawAudioPlayer = function RawAudioPlayer(stream, mimetype) { // Calculate overall duration (in seconds) var duration = samples / format.rate; - // Recalculate latency threshold based on packet size - maxLatency = duration * 2; - // Determine exactly when packet CAN play var packetTime = context.currentTime; if (nextPacketTime < packetTime)