mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-25 07:22:33 -05:00
Update sound sampleCount and rate
This commit is contained in:
parent
6c2d5b8a83
commit
8243d0f53a
1 changed files with 2 additions and 0 deletions
|
@ -795,6 +795,8 @@ class VirtualMachine extends EventEmitter {
|
||||||
sound.assetId = sound.asset.assetId;
|
sound.assetId = sound.asset.assetId;
|
||||||
sound.dataFormat = storage.DataFormat.WAV;
|
sound.dataFormat = storage.DataFormat.WAV;
|
||||||
sound.md5 = `${sound.assetId}.${sound.dataFormat}`;
|
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
|
// If soundEncoding is null, it's because gui had a problem
|
||||||
// encoding the updated sound. We don't want to store anything in this
|
// encoding the updated sound. We don't want to store anything in this
|
||||||
|
|
Loading…
Reference in a new issue