diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/java/com/jogamp/common/av/AudioSink.java | 12 | ||||
-rw-r--r-- | src/java/jogamp/common/av/JavaSoundAudioSink.java | 6 | ||||
-rw-r--r-- | src/java/jogamp/common/av/NullAudioSink.java | 6 |
3 files changed, 24 insertions, 0 deletions
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 @@ -242,6 +242,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 <code>available state</code> of this instance. * <p> * The <code>available state</code> is affected by this instance diff --git a/src/java/jogamp/common/av/JavaSoundAudioSink.java b/src/java/jogamp/common/av/JavaSoundAudioSink.java index 4e4fdec..48a2a4d 100644 --- a/src/java/jogamp/common/av/JavaSoundAudioSink.java +++ b/src/java/jogamp/common/av/JavaSoundAudioSink.java @@ -84,6 +84,12 @@ public class JavaSoundAudioSink implements AudioSink { } @Override + public final void lockExclusive() { } + + @Override + public final void unlockExclusive() { } + + @Override public String toString() { return "JavaSoundSink[avail "+available+", dataLine "+info+", source "+auline+", bufferCount "+bufferCount+ ", chosen "+chosenFormat+", jsFormat "+format; diff --git a/src/java/jogamp/common/av/NullAudioSink.java b/src/java/jogamp/common/av/NullAudioSink.java index c1b0d33..6b918d9 100644 --- a/src/java/jogamp/common/av/NullAudioSink.java +++ b/src/java/jogamp/common/av/NullAudioSink.java @@ -47,6 +47,12 @@ public class NullAudioSink implements AudioSink { } @Override + public final void lockExclusive() { } + + @Override + public final void unlockExclusive() { } + + @Override public boolean isAvailable() { return available; } |