Skip to content
Snippets Groups Projects
Unverified Commit 505e4af6 authored by Paul Kaplan's avatar Paul Kaplan Committed by GitHub
Browse files

Merge pull request #1718 from kchadha/recorded-sound-metadata

Store sample rate/count for recorded sounds
parents db54c6c5 d3d1de96
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,8 @@ class RecordModal extends React.Component {
const vmSound = {
format: '',
dataFormat: 'wav',
name: `recording ${this.props.vm.editingTarget.sprite.sounds.length}`
rate: this.state.sampleRate,
sampleCount: clippedSamples.length
};
// Load the encoded .wav into the storage cache and get resulting
......@@ -90,6 +91,9 @@ class RecordModal extends React.Component {
// update vmSound object with md5 property
vmSound.md5 = `${md5}.${vmSound.dataFormat}`;
// The VM will update the sound name to a fresh name
// if the following is already taken
vmSound.name = 'recording1';
this.props.vm.addSound(vmSound).then(() => {
this.props.onClose();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment