Fixed audio not loading if tsv file didn't load any audio.

Made list of mstids an array of allowed mstids instead of making a weird if block for allowed ids.
This commit is contained in:
firebingo 2018-05-30 20:24:01 -07:00
parent 72cc69cb0b
commit 5d51d0f2a9
3 changed files with 13 additions and 8 deletions

View file

@ -153,12 +153,18 @@ class audioController {
}
loadSounds(soundMap, callback) {
this.loader = new bufferLoader(this.audioCtx, soundMap, (percent) => {
if(!soundMap || soundMap.length === 0) {
if (callback) {
callback(percent);
callback(100);
}
});
this.loader.load();
} else {
this.loader = new bufferLoader(this.audioCtx, soundMap, (percent) => {
if (callback) {
callback(percent);
}
});
this.loader.load();
}
}
resetAll() {