floatinghotpot/cordova-plugin-nativeaudio

[question] Play multiple simplesound with one play() call

manusimpson opened this issue · 0 comments

Hi, I'm working on an app that must play multiple sounds (the user pick 1 or more) at same time and should loop a defined number of times. Currently I did tests using one play() call by each sound into a JS setInterval() loop but the I get an unpredictable result. Some times the sounds are played well but most times are not synchronized, and the interval (around 250ms) have delay or lag. So my question is if there are any way to call multiple sounds in one play(). ex: play(['sound1','sound2', ...]). I think that this can be a solution to the unpredictable behavior because it will reduce the overhead. (I suspect that setInteval() could be the problem too)
Currently I'm doing:
setInterval(...
play('sound1')
play('sound2')
play('sound3')
...)
My question:
setInterval(...
play(['sound1','sound2', ...])
...)
@sidneys @floatinghotpot
Thanks in advance.