Use arraybuffer-loader instead of buffer-loader to load the start and end sounds. The music extension switched to this a few days ago.

This commit is contained in:
picklesrus 2018-05-07 15:21:44 -07:00
parent f3544238da
commit 08cbabe2ea
2 changed files with 4 additions and 4 deletions

View file

@ -196,12 +196,12 @@ class Scratch3SpeechBlocks {
* @private
*/
_loadUISounds () {
const startSoundBuffer = assetData['speech-rec-start.mp3'].buffer;
const startSoundBuffer = assetData['speech-rec-start.mp3'];
this._decodeSound(startSoundBuffer).then(buffer => {
this._startSoundBuffer = buffer;
});
const endSoundBuffer = assetData['speech-rec-end.mp3'].buffer;
const endSoundBuffer = assetData['speech-rec-end.mp3'];
this._decodeSound(endSoundBuffer).then(buffer => {
this._endSoundBuffer = buffer;
});

View file

@ -1,4 +1,4 @@
module.exports = {
'speech-rec-start.mp3': require('!buffer-loader!./assets/speech-rec-start.mp3'),
'speech-rec-end.mp3': require('!buffer-loader!./assets/speech-rec-end.mp3')
'speech-rec-start.mp3': require('!arraybuffer-loader!./assets/speech-rec-start.mp3'),
'speech-rec-end.mp3': require('!arraybuffer-loader!./assets/speech-rec-end.mp3')
};