From d4f4ec0fb297b4c6fc4ec8ea0c8fa810ae255c48 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 2 Oct 2015 16:52:37 -0700 Subject: [PATCH] GUAC-1354: Use ArrayBuffer.slice - do not call slice directly on typed arrays (not widely supported). --- guacamole-common-js/src/main/webapp/modules/AudioPlayer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guacamole-common-js/src/main/webapp/modules/AudioPlayer.js b/guacamole-common-js/src/main/webapp/modules/AudioPlayer.js index 98b3189ba..330881caa 100644 --- a/guacamole-common-js/src/main/webapp/modules/AudioPlayer.js +++ b/guacamole-common-js/src/main/webapp/modules/AudioPlayer.js @@ -332,8 +332,8 @@ Guacamole.RawAudioPlayer = function RawAudioPlayer(stream, mimetype) { // Otherwise, split the packet into two new packets according to the // calculated optimal split length return [ - data.slice(0, optimalSplitLength), - data.slice(optimalSplitLength) + new SampleArray(data.buffer.slice(0, optimalSplitLength * format.bytesPerSample)), + new SampleArray(data.buffer.slice(optimalSplitLength * format.bytesPerSample)) ]; };