WAV files are looping too soon on cpp Mac target

I’m experiencing this same issue with WAV files on the Mac CPP target. My sound is edited to loop perfectly, and it does so in audacity. But when I loop it in-game, it seems to loop a tiny bit early, which creates a choppy effect. I’ve tried re-exporting from Audacity as 16-bit PCM as recommended by this post just to be sure, and it doesn’t resolve the issue.

I’m running Haxe 3.4.7, OpenFl 8.8.0, Lime 7.2.1. (Can’t upgrade for this particular project.) Digging into NativeAudioSource, it looks as though it’s correctly reading the length of the sound and setting the timers for the right duration. So I’m not sure exactly what the problem might be.

I’ll keep digging around but I’m wondering if anyone has any ideas.

This is a shot in the dark, but I would try compressing the audio one time using a constant bit rate, just to rule out any surges in processing causing your choppy effect. Exporting as MP3, Audacity lets you choose these settings. I would start with a low rate like 48 kbps first. Let us know how it goes!

don’t use WAV in project. it’s to big and instable work in diferent platforms. Use mp3 for html5 and ogg for native.