diff --git a/src/containers/sound-editor.jsx b/src/containers/sound-editor.jsx index 30bd62d84..7706b1e98 100644 --- a/src/containers/sound-editor.jsx +++ b/src/containers/sound-editor.jsx @@ -86,7 +86,7 @@ SoundEditor.propTypes = { const mapStateToProps = (state, {soundIndex}) => { const sound = state.vm.editingTarget.sprite.sounds[soundIndex]; - const audioBuffer = state.vm.runtime.audioEngine.audioBuffers[sound.md5]; + const audioBuffer = state.vm.getSoundBuffer(soundIndex); return { sampleRate: audioBuffer.sampleRate, samples: audioBuffer.getChannelData(0), diff --git a/src/containers/sound-library.jsx b/src/containers/sound-library.jsx index 9c1608fb7..fb98c070c 100644 --- a/src/containers/sound-library.jsx +++ b/src/containers/sound-library.jsx @@ -40,8 +40,8 @@ class SoundLibrary extends React.PureComponent { }; return this.audioEngine.decodeSound(sound); }) - .then(() => { - this.player.playSound(soundItem._md5); + .then(soundId => { + this.player.playSound(soundId); }); } handleItemMouseLeave () {