diff options
author | Sven Gothel <[email protected]> | 2023-05-23 01:34:28 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-05-23 01:34:28 +0200 |
commit | c04726720a57f8db42f2621ad58ff3bd42006c63 (patch) | |
tree | c05430588237d29f32d1ec62004a598c09d7750c /src/java/jogamp/common | |
parent | 742cf0cd053f968cbf291ed367d4568c12d8bde2 (diff) |
AudioSink: Refine context locking where supported, have a more usable universal API interface
Diffstat (limited to 'src/java/jogamp/common')
-rw-r--r-- | src/java/jogamp/common/av/JavaSoundAudioSink.java | 6 | ||||
-rw-r--r-- | src/java/jogamp/common/av/NullAudioSink.java | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/java/jogamp/common/av/JavaSoundAudioSink.java b/src/java/jogamp/common/av/JavaSoundAudioSink.java index 7cd4310..d3ddda9 100644 --- a/src/java/jogamp/common/av/JavaSoundAudioSink.java +++ b/src/java/jogamp/common/av/JavaSoundAudioSink.java @@ -44,7 +44,7 @@ import com.jogamp.common.av.AudioSink; * audio capabilities * </p> */ -public class JavaSoundAudioSink implements AudioSink { +public final class JavaSoundAudioSink implements AudioSink { // Chunk of audio processed at one time public static final int BUFFER_SIZE = 1000; @@ -85,10 +85,10 @@ public class JavaSoundAudioSink implements AudioSink { } @Override - public final void lockExclusive() { } + public final boolean makeCurrent(final boolean throwException) { return true; } @Override - public final void unlockExclusive() { } + public final boolean release(final boolean throwException) { return true; } @Override public String toString() { diff --git a/src/java/jogamp/common/av/NullAudioSink.java b/src/java/jogamp/common/av/NullAudioSink.java index ca5e2f4..19b0acb 100644 --- a/src/java/jogamp/common/av/NullAudioSink.java +++ b/src/java/jogamp/common/av/NullAudioSink.java @@ -32,7 +32,7 @@ import java.nio.ByteBuffer; import com.jogamp.common.av.AudioFormat; import com.jogamp.common.av.AudioSink; -public class NullAudioSink implements AudioSink { +public final class NullAudioSink implements AudioSink { private volatile float playSpeed = 1.0f; private volatile boolean playRequested = false; @@ -48,10 +48,10 @@ public class NullAudioSink implements AudioSink { } @Override - public final void lockExclusive() { } + public final boolean makeCurrent(final boolean throwException) { return true; } @Override - public final void unlockExclusive() { } + public final boolean release(final boolean throwException) { return true; } @Override public boolean isAvailable() { |