Update sound sampleCount and rate

This commit is contained in:
Eric Rosenbaum 2019-06-05 17:06:27 -04:00
parent 6c2d5b8a83
commit 8243d0f53a

View file

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