mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +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
|
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.
|
// TODO: ScriptProcessorNode will be replaced with Audio WebWorker.
|
||||||
// https://developer.mozilla.org/ja/docs/Web/API/ScriptProcessorNode
|
// https://developer.mozilla.org/ja/docs/Web/API/ScriptProcessorNode
|
||||||
for i := 0; i < MaxChannel; i++ {
|
for i := 0; i < MaxChannel; i++ {
|
||||||
|
Loading…
Reference in New Issue
Block a user