From e17b5d6b86f8587397f3229610319378a9a4c495 Mon Sep 17 00:00:00 2001 From: Ralty <78720179+Raltyro@users.noreply.github.com> Date: Sat, 9 Aug 2025 13:41:05 +0700 Subject: [PATCH] Fix audio calling complete callbacks twice --- source/lime/_internal/backend/native/NativeAudioSource.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/lime/_internal/backend/native/NativeAudioSource.hx b/source/lime/_internal/backend/native/NativeAudioSource.hx index 894f6274..9f0939d7 100644 --- a/source/lime/_internal/backend/native/NativeAudioSource.hx +++ b/source/lime/_internal/backend/native/NativeAudioSource.hx @@ -161,9 +161,9 @@ class NativeAudioSource { } private function complete() { - completed = true; + if (!completed) parent.onComplete.dispatch(); stop(); - parent.onComplete.dispatch(); + completed = true; } // Streaming, atleast for vorbis for now.