remove ogg test

This commit is contained in:
Bui 2019-02-06 19:55:13 +00:00
parent 235a282d1e
commit 1fffb5fc13
2 changed files with 71 additions and 83 deletions

View File

@ -155,7 +155,6 @@ var assets = {
"bgm_result.mp3",
"bgm_setsume.mp3"
],
"audioOgg": "note_ka.ogg",
"fonts": [
"Kozuka",
"TnT"

View File

@ -90,7 +90,7 @@ class Loader{
}))
this.afterJSCount =
[assets.audioOgg, "blurPerformance", "P2Connection"].length +
["blurPerformance", "P2Connection"].length +
assets.fonts.length +
assets.audioSfx.length +
assets.audioMusic.length +
@ -113,14 +113,6 @@ class Loader{
)
snd.sfxLoudGain.setVolume(1.2)
this.afterJSCount--
this.addPromise(snd.buffer.load(gameConfig.assets_baseurl + "audio/" + assets.audioOgg).then(() => {
this.oggNotSupported = false
}, () => {
this.oggNotSupported = true
}).then(() => {
this.afterJSCount = 0
assets.fonts.forEach(name => {
@ -194,7 +186,7 @@ class Loader{
})
}, this.errorMsg.bind(this))
}))
})
}
@ -203,9 +195,6 @@ class Loader{
promise.then(this.assetLoaded.bind(this))
}
loadSound(name, gain){
if(this.oggNotSupported && name.endsWith(".ogg")){
name = name.slice(0, -4) + ".wav"
}
var id = this.getFilename(name)
return gain.load(gameConfig.assets_baseurl + "audio/" + name).then(sound => {
assets.sounds[id] = sound