diff --git a/CHANGES b/CHANGES index 449476a35b7..662650b4652 100644 --- a/CHANGES +++ b/CHANGES @@ -11,6 +11,7 @@ - [BREAKING CHANGE] MeshPartBuilder#lastIndex now returns int instead of short. - [BREAKING CHANGE] 3D API - max bone weights is now configurable and limited to 4 by default. Change this value if you need less or more. See #6522. - [BREAKING CHANGE] Mesh#getVerticesBuffer, Mesh#getIndicesBuffer, VertexData#getBuffer, and IndexData#getBuffer are deprecated in favor to new methods with boolean parameter. If you subclassed some of these classes, you need to implement the new methods. +- [BREAKING CHANGE] Desktop: The return value of AudioDevice#getLatency() is now in samples, and not milliseconds - iOS: Add new MobiVM MetalANGLE backend - API Addition: Added Haptics API with 4 different Input#vibrate() methods with complete Android and iOS implementations. - Fix: Fixed Android and iOS touch cancelled related issues, see #6871. diff --git a/backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/audio/OpenALAudioDevice.java b/backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/audio/OpenALAudioDevice.java index 33245508633..9789ae189d6 100644 --- a/backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/audio/OpenALAudioDevice.java +++ b/backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/audio/OpenALAudioDevice.java @@ -202,7 +202,7 @@ public boolean isMono () { } public int getLatency () { - return (int)(secondsPerBuffer * bufferCount * 1000); + return (int)((float)bufferSize / bytesPerSample / channels * bufferCount); } @Override diff --git a/backends/gdx-backend-lwjgl3/src/com/badlogic/gdx/backends/lwjgl3/audio/OpenALAudioDevice.java b/backends/gdx-backend-lwjgl3/src/com/badlogic/gdx/backends/lwjgl3/audio/OpenALAudioDevice.java index fd4f1c68ccb..a45c93a2b64 100644 --- a/backends/gdx-backend-lwjgl3/src/com/badlogic/gdx/backends/lwjgl3/audio/OpenALAudioDevice.java +++ b/backends/gdx-backend-lwjgl3/src/com/badlogic/gdx/backends/lwjgl3/audio/OpenALAudioDevice.java @@ -202,7 +202,7 @@ public boolean isMono () { } public int getLatency () { - return (int)(secondsPerBuffer * bufferCount * 1000); + return (int)((float)bufferSize / bytesPerSample / channels * bufferCount); } @Override