libgdx/libgdx — pull request #2551 by Zomby2D (2014-11-06 04:47:23+00:00)
Title: Fixed accuracy of the OpenAL music getPosition() and setPosition() on lwjgl backend

This should hopefully fix #2545 and #2546.

I've reworked `setPosition()` to be more accurate and fixed a bug where it actually added the buffer's length to the elapsed time.

I've also found out that calculation for `secondsPerBuffer` was off for MP3 as the decoder apparently requires a 4096 bytes buffer overhead. This caused the reported time from `getPosition()` to become more and more off as the playback went on, and the issue also plagued `setPosition()` who relied on the same numbers for it's positioning. I've taken this overhead into account and the reported position is now spot on.