HTML5 audio context fix
This commit is contained in:
@@ -42,7 +42,7 @@ class AudioContext {
|
||||
try {
|
||||
|
||||
untyped __js__ ("window.AudioContext = window.AudioContext || window.webkitAudioContext;");
|
||||
web = cast untyped __js__ ("new AudioContext ()");
|
||||
web = cast untyped __js__ ("new window.AudioContext ()");
|
||||
this.type = WEB;
|
||||
|
||||
} catch (e:Dynamic) {}
|
||||
|
||||
@@ -32,7 +32,8 @@ class AudioManager {
|
||||
|
||||
if (context == null) {
|
||||
|
||||
context = new AudioContext ();
|
||||
AudioManager.context = new AudioContext ();
|
||||
context = AudioManager.context;
|
||||
|
||||
#if !lime_doc_gen
|
||||
if (context.type == OPENAL) {
|
||||
@@ -47,12 +48,10 @@ class AudioManager {
|
||||
}
|
||||
#end
|
||||
|
||||
} else {
|
||||
|
||||
AudioManager.context = context;
|
||||
|
||||
}
|
||||
|
||||
AudioManager.context = context;
|
||||
|
||||
#if (lime_cffi && !macro && lime_openal && (ios || tvos || mac))
|
||||
var timer = new Timer (100);
|
||||
timer.run = function () {
|
||||
|
||||
Reference in New Issue
Block a user