Fix audio stutter on HTML5

Patches an issue causing audio to play twice if force_html_audio is enabled. This appears to be an oversight with Howl.
This commit is contained in:
Zanzlanz
2020-08-24 20:56:08 -04:00
committed by Joshua Granick
parent bf2b51ce1e
commit 283176fa5e

View File

@@ -54,8 +54,14 @@ class HTML5AudioSource
parent.buffer.__srcHowl.on("end", howl_onEnd, id);
// Calling setCurrentTime causes html5 audio to replay from this position on next frame
#if force_html5_audio
if(time == 0) setCurrentTime(time);
#else
setCurrentTime(time);
#end
#end
}
public function pause():Void