If the system falls back to an alternative mix format with a different sample rate than preferred by Kinc, it could happen that the sample rate in the Haxe API wasn't correctly updated because it it was read before the audio was initialized.
Also, audio buffers used a hard-coded sample rate which would fail in the same situation. This would lead to playback with a wrong speed because the resampling code in resampling audio channels depends on the sample rate passed here.
Btw, what's the reason why the sample rate is stored in each buffer when it's also a globally accessible variable? Are the buffers designed to be used for multiple purposes?
On Krom there are similar issues but I couldn't get Krom audio to work even after enabling it in main.cpp (see https://github.com/Kode/Krom/issues/138#issuecomment-558732832; I know of the issues because they exist in Armorcore and they are likely to exist in Kode/Krom as well). I will try to dig deeper in the next days and then eventually open an issue or add something to the linked issue.
If the system falls back to an alternative mix format with a different sample rate than preferred by Kinc, it could happen that the sample rate in the Haxe API wasn't correctly updated because it it was read before the audio was initialized.
Also, audio buffers used a hard-coded sample rate which would fail in the same situation. This would lead to playback with a wrong speed because the resampling code in resampling audio channels depends on the sample rate passed here.
Btw, what's the reason why the sample rate is stored in each buffer when it's also a globally accessible variable? Are the buffers designed to be used for multiple purposes?
On Krom there are similar issues but I couldn't get Krom audio to work even after enabling it in main.cpp (see https://github.com/Kode/Krom/issues/138#issuecomment-558732832; I know of the issues because they exist in Armorcore and they are likely to exist in Kode/Krom as well). I will try to dig deeper in the next days and then eventually open an issue or add something to the linked issue.