Merge pull request #566 from paulkaplan/sound-ids
Use sound ID coming back from decodeSound
This commit is contained in:
commit
cecccee8fb
2 files changed
+3
-3
No files matched your search
@@ -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),
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
Reference in new issue
Block a user