diff --git a/source/funkin/editors/ui/UIAudioPlayer.hx b/source/funkin/editors/ui/UIAudioPlayer.hx index da1707b7..bd7aaec7 100644 --- a/source/funkin/editors/ui/UIAudioPlayer.hx +++ b/source/funkin/editors/ui/UIAudioPlayer.hx @@ -29,9 +29,9 @@ class UIAudioPlayer extends UIButton { public function new(x:Float, y:Float, bytes:Bytes) { sound = FlxG.sound.load(Sound.fromAudioBuffer(AudioBuffer.fromBytes(bytes))); - super(x, y, null, function () { + super(x, y, null, () -> { if (sound.playing) sound.pause(); - else sound.play(false, sound.time); + else sound.play(); }, 58 - 16, 58 - 16); playingSprite = new FlxSprite(x + ((58 - 16)/2) - 8, y + ((58 - 16)/2) - 8).loadGraphic(Paths.image('editors/ui/audio-buttons'), true, 16, 16); @@ -126,7 +126,7 @@ class UIAudioPlayer extends UIButton { if (FlxG.mouse.released) { if (draggingObj == timeBar && wasPlaying) { - sound.resume(); + sound.play(); wasPlaying = false; } draggingObj = null; diff --git a/source/lime/_internal/backend/native/NativeAudioSource.hx b/source/lime/_internal/backend/native/NativeAudioSource.hx index 478ed150..4332fba4 100644 --- a/source/lime/_internal/backend/native/NativeAudioSource.hx +++ b/source/lime/_internal/backend/native/NativeAudioSource.hx @@ -394,6 +394,7 @@ class NativeAudioSource { AL.sourcePlay(handle); } } + else completed = value + 1 < getLength(); if (!playing && streamed) bufferTimes[STREAM_MAX_BUFFERS - (requestBuffers = queuedBuffers = 1)] = value / 1000;