mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
#126: Fix the bug crashing on Safari
This commit is contained in:
parent
7490bfa4f4
commit
115c97f296
@ -57,7 +57,14 @@ func initialize() {
|
||||
return
|
||||
}
|
||||
|
||||
context = js.Global.Get("AudioContext").New()
|
||||
class := js.Global.Get("AudioContext")
|
||||
if class == js.Undefined {
|
||||
class = js.Global.Get("webkitAudioContext")
|
||||
}
|
||||
if class == js.Undefined {
|
||||
return
|
||||
}
|
||||
context = class.New()
|
||||
// TODO: ScriptProcessorNode will be replaced with Audio WebWorker.
|
||||
// https://developer.mozilla.org/ja/docs/Web/API/ScriptProcessorNode
|
||||
for i := 0; i < MaxChannel; i++ {
|
||||
|
Loading…
Reference in New Issue
Block a user