mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
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:
@@ -183,7 +183,7 @@ Guacamole.RawAudioPlayer = function RawAudioPlayer(stream, mimetype) {
|
|||||||
/**
|
/**
|
||||||
* The maximum amount of latency to allow between the buffered data stream
|
* The maximum amount of latency to allow between the buffered data stream
|
||||||
* and the playback position, in seconds. Initially, this is set to
|
* 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
|
* @private
|
||||||
* @type Number
|
* @type Number
|
||||||
@@ -199,9 +199,6 @@ Guacamole.RawAudioPlayer = function RawAudioPlayer(stream, mimetype) {
|
|||||||
// Calculate overall duration (in seconds)
|
// Calculate overall duration (in seconds)
|
||||||
var duration = samples / format.rate;
|
var duration = samples / format.rate;
|
||||||
|
|
||||||
// Recalculate latency threshold based on packet size
|
|
||||||
maxLatency = duration * 2;
|
|
||||||
|
|
||||||
// Determine exactly when packet CAN play
|
// Determine exactly when packet CAN play
|
||||||
var packetTime = context.currentTime;
|
var packetTime = context.currentTime;
|
||||||
if (nextPacketTime < packetTime)
|
if (nextPacketTime < packetTime)
|
||||||
|
Reference in New Issue
Block a user