I’m using Haxe Lime (6.5.0) without OpenFL.
I have an sound file that is split into 1 second oneshots. So I want to be able to trigger those individual oneshots in arbitrary order.
Here’s an example of how my code looks:
var oneshot = 3; // Pick the fourth oneshot (3000 milliseconds in) var audioSource:AudioSource = new AudioSource(buffer, 1000 * oneshot, 1000); audioSource.play();
For the C++ target, this works great!
For the HTML5 target, the “length” parameter seems to be ignored for all sound formats.
The entire sound plays. The “offset” parameter still works as expected though.
I’ve run this with OGG, WAV, and MP3, with identical results (though MP3 is not supported with C++).
Is this fixable from my end? I haven’t really done any other audio setup aside from the code provided.