Skip to content

Commit e17b5d6

Browse files
committed
Fix audio calling complete callbacks twice
1 parent 0ff829e commit e17b5d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/lime/_internal/backend/native/NativeAudioSource.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ class NativeAudioSource {
161161
}
162162

163163
private function complete() {
164-
completed = true;
164+
if (!completed) parent.onComplete.dispatch();
165165
stop();
166-
parent.onComplete.dispatch();
166+
completed = true;
167167
}
168168

169169
// Streaming, atleast for vorbis for now.

0 commit comments

Comments
 (0)