GUAC-1354: Use ArrayBuffer.slice - do not call slice directly on typed arrays (not widely supported).

This commit is contained in:
Michael Jumper
2015-10-02 16:52:37 -07:00
parent 079e3dad8c
commit d4f4ec0fb2

View File

@@ -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))
];
};