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.

This commit is contained in:
Michael Jumper
2015-09-30 17:11:54 -07:00
parent 324c800167
commit a3dd959dc4

View File

@@ -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)