From 8243d0f53a8ddf2709ec2b9c5f85876d05381cb6 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Wed, 5 Jun 2019 17:06:27 -0400 Subject: [PATCH] Update sound sampleCount and rate --- src/virtual-machine.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/virtual-machine.js b/src/virtual-machine.js index deb1471e1..c53be8a22 100644 --- a/src/virtual-machine.js +++ b/src/virtual-machine.js @@ -795,6 +795,8 @@ class VirtualMachine extends EventEmitter { sound.assetId = sound.asset.assetId; sound.dataFormat = storage.DataFormat.WAV; sound.md5 = `${sound.assetId}.${sound.dataFormat}`; + sound.sampleCount = newBuffer.length; + sound.rate = newBuffer.sampleRate; } // If soundEncoding is null, it's because gui had a problem // encoding the updated sound. We don't want to store anything in this