Merge pull request #2197 from ericrosenbaum/bugfix/update-sound-duration

Update sound duration
This commit is contained in:
Paul Kaplan 2019-06-06 14:05:44 -04:00 committed by GitHub
commit f74bf88ce3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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