Recording names should start at 1, and let the vm create fresh names as needed.

This commit is contained in:
Karishma Chadha committed 2018-04-04 22:00:22 -04:00
1 parent 8b81ef310a
commit a2d7e6525d
1 file changed
+4 -2
+4 -2
View File
@@ -77,8 +77,7 @@ class RecordModal extends React.Component {
format: '',
dataFormat: 'wav',
rate: this.state.sampleRate,
sampleCount: clippedSamples.length,
name: `recording ${this.props.vm.editingTarget.sprite.sounds.length}`
sampleCount: clippedSamples.length
};
// Load the encoded .wav into the storage cache and get resulting
@@ -92,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 = 'recording 1';
this.props.vm.addSound(vmSound).then(() => {
this.props.onClose();