From 37977b4fe48cdc6be6f8e4938b5c79371d527a5d Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 17 May 2023 16:26:56 +0200 Subject: AudioSink: Add exclusive locking allowing implementations to short-cut for less management overhead (-> OpenAL + Synthesizer) --- src/java/com/jogamp/common/av/AudioSink.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/java/com/jogamp/common/av/AudioSink.java') diff --git a/src/java/com/jogamp/common/av/AudioSink.java b/src/java/com/jogamp/common/av/AudioSink.java index 3973d33..d41e05b 100644 --- a/src/java/com/jogamp/common/av/AudioSink.java +++ b/src/java/com/jogamp/common/av/AudioSink.java @@ -241,6 +241,18 @@ public interface AudioSink { } } + /** + * Exclusively locks this instance for the calling thread, if implementation utilizes locking. + * @see #unlockExclusive() + */ + public void lockExclusive(); + + /** + * Releases the exclusive lock for the calling thread, if implementation utilizes locking. + * @see #lockExclusive() + */ + public void unlockExclusive(); + /** * Returns the available state of this instance. *

-- cgit v1.2.3