I'm working on an update for my APP "Easy Chords Studio", in which I've build a so called arpeggiator.
This ARP is nothing more than playing notes after each other with a certain delay (determined by the BPM)
I'm running into a audio latency / delay issue when using the default audio plugin in Construct 2.
(the sounds are played after very noticeble different delays instead of a stable delay)
Basicly, this is what I do in the construct code:
AUDIO : Play Sound
SYSTEM: Wait 0.1875 seconds
AUDIO : Play Sound
SYSTEM: Wait 0.1875 seconds
AUDIO : Play Sound
SYSTEM: Wait 0.1875 seconds
AUDIO : Play Sound
SYSTEM: Wait 0.1875 seconds
ETC ...
Running the app in preview mode in browser sounds smooth.
But running the APP on actual devices, things get messed up in the timing.
(Exported the project to XDK using cordova and build for both iOS and Android)
Logging the time difference after each play shows a quite stable playback:
But the actual delay (measured by recording back the audio output and analysing it) varies way more.
Delay took: 198ms (actual delay: 246ms)
Delay took: 202ms (actual delay: 246ms)
Delay took: 203ms (actual delay: 161ms)
Delay took: 201ms (actual delay: 243ms)
Delay took: 203ms (actual delay: 161ms)
Already tried stopping all sounds after each delay, so no polophony, but unfortunatly the same result.
And yes, preloading of sounds is enabled in this project
Is there a way I can make, at least the delays between the notes the same?