SongSelect: Add ura difficulty
This commit is contained in:
@@ -2,11 +2,7 @@
|
||||
constructor(){
|
||||
var AudioContext = window.AudioContext || window.webkitAudioContext
|
||||
this.context = new AudioContext()
|
||||
pageEvents.once(window, "click").then(() => {
|
||||
if(this.context.state === "suspended"){
|
||||
this.context.resume()
|
||||
}
|
||||
})
|
||||
pageEvents.add(window, ["click", "touchend"], this.pageClicked.bind(this))
|
||||
}
|
||||
load(url, gain){
|
||||
return loader.ajax(url, request => {
|
||||
@@ -48,6 +44,11 @@
|
||||
source.connect(sound.gain.gainNode || this.context.destination)
|
||||
return source
|
||||
}
|
||||
pageClicked(){
|
||||
if(this.context.state === "suspended"){
|
||||
this.context.resume()
|
||||
}
|
||||
}
|
||||
}
|
||||
class SoundGain{
|
||||
constructor(soundBuffer, channel){
|
||||
|
||||
Reference in New Issue
Block a user