Merge pull request #566 from paulkaplan/sound-ids

Use sound ID coming back from decodeSound
This commit is contained in:
Paul Kaplan authored and GitHub committed 2017-07-26 09:00:16 -04:00
commit cecccee8fb
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -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),
+2 -2
View File
@@ -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 () {