From 4ea2904f33113cdfc77d46b5bea8696c66b3dbb6 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Fri, 30 Dec 2016 17:34:54 -0800 Subject: [PATCH] Correct multiple howler.js playback (resolve openfl/openfl#1368) --- lime/_backend/html5/HTML5AudioSource.hx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lime/_backend/html5/HTML5AudioSource.hx b/lime/_backend/html5/HTML5AudioSource.hx index 69a619557..b4f22cff9 100644 --- a/lime/_backend/html5/HTML5AudioSource.hx +++ b/lime/_backend/html5/HTML5AudioSource.hx @@ -24,6 +24,7 @@ class HTML5AudioSource { this.parent = parent; + id = -1; gain = 1; position = new Vector4 (); @@ -147,6 +148,12 @@ class HTML5AudioSource { public function getCurrentTime ():Int { + if (id == -1) { + + return 0; + + } + #if howlerjs if (completed) {