From 10b236976ffef7d1a330e601bf8dc6b0228ec36b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 3 Oct 2023 01:25:11 +0200 Subject: SimpleSineSynth: Ensure stop() destroys ALAudioSink even if streamWorker is not running --- src/java/com/jogamp/openal/util/SimpleSineSynth.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/java/com/jogamp/openal/util/SimpleSineSynth.java b/src/java/com/jogamp/openal/util/SimpleSineSynth.java index c3befe6..103353a 100644 --- a/src/java/com/jogamp/openal/util/SimpleSineSynth.java +++ b/src/java/com/jogamp/openal/util/SimpleSineSynth.java @@ -120,6 +120,8 @@ public final class SimpleSineSynth { if( null != streamWorker ) { streamWorker.doStop(); streamWorker = null; + } else { + audioSink.destroy(); } } } -- cgit v1.2.3