OpenAL uses total, not relative offset for current time

This commit is contained in:
Joshua Granick
2017-02-15 12:01:11 -08:00
parent 06993731c8
commit 9569206839

View File

@@ -404,9 +404,8 @@ class NativeAudioSource {
var ratio = (secondOffset / totalSeconds); var ratio = (secondOffset / totalSeconds);
var totalOffset = Std.int (dataLength * ratio); var totalOffset = Std.int (dataLength * ratio);
var currentOffset = AL.getSourcei (handle, AL.BYTE_OFFSET);
AL.sourcei (handle, AL.BYTE_OFFSET, totalOffset - currentOffset); AL.sourcei (handle, AL.BYTE_OFFSET, totalOffset);
} }