aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/jogamp/common
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-10-04 08:59:47 +0200
committerSven Gothel <[email protected]>2023-10-04 08:59:47 +0200
commite23a4c7fcc0b585c0708be114fa364e391da4843 (patch)
tree01d3813791f9d1baa54b076a87cf445e5b1c0074 /src/java/jogamp/common
parent0a0d4fc054670e2a40721a18930322b91ae580c8 (diff)
AudioSink: Just pass a finte buffer size (KISS), add getLastBufferedPTS() to access the last buffered audio pts
Diffstat (limited to 'src/java/jogamp/common')
-rw-r--r--src/java/jogamp/common/av/JavaSoundAudioSink.java5
-rw-r--r--src/java/jogamp/common/av/NullAudioSink.java36
2 files changed, 16 insertions, 25 deletions
diff --git a/src/java/jogamp/common/av/JavaSoundAudioSink.java b/src/java/jogamp/common/av/JavaSoundAudioSink.java
index 58f0fec..94ad236 100644
--- a/src/java/jogamp/common/av/JavaSoundAudioSink.java
+++ b/src/java/jogamp/common/av/JavaSoundAudioSink.java
@@ -179,7 +179,7 @@ public final class JavaSoundAudioSink implements AudioSink {
}
@Override
- public boolean init(final AudioFormat requestedFormat, final int frameDuration, final int initialQueueSize, final int queueGrowAmount, final int queueLimit) {
+ public boolean init(final AudioFormat requestedFormat, final int frameDuration, final int queueSize) {
if( !staticAvailable ) {
return false;
}
@@ -317,4 +317,7 @@ public final class JavaSoundAudioSink implements AudioSink {
@Override
public final int getPTS() { return 0; } // FIXME
+ @Override
+ public int getLastBufferedPTS() { return 0; } // FIXME
+
}
diff --git a/src/java/jogamp/common/av/NullAudioSink.java b/src/java/jogamp/common/av/NullAudioSink.java
index 904b863..0626ca8 100644
--- a/src/java/jogamp/common/av/NullAudioSink.java
+++ b/src/java/jogamp/common/av/NullAudioSink.java
@@ -127,7 +127,7 @@ public final class NullAudioSink implements AudioSink {
}
@Override
- public boolean init(final AudioFormat requestedFormat, final int frameDuration, final int initialQueueSize, final int queueGrowAmount, final int queueLimit) {
+ public boolean init(final AudioFormat requestedFormat, final int frameDuration, final int queueSize) {
chosenFormat = requestedFormat;
return true;
}
@@ -153,8 +153,7 @@ public final class NullAudioSink implements AudioSink {
}
@Override
- public void flush() {
- }
+ public void flush() { }
@Override
public void destroy() {
@@ -163,42 +162,31 @@ public final class NullAudioSink implements AudioSink {
}
@Override
- public final int getEnqueuedFrameCount() {
- return 0;
- }
+ public final int getEnqueuedFrameCount() { return 0; }
@Override
- public int getFrameCount() {
- return 0;
- }
+ public int getFrameCount() { return 0; }
@Override
- public int getQueuedFrameCount() {
- return 0;
- }
+ public int getQueuedFrameCount() { return 0; }
@Override
- public int getQueuedByteCount() {
- return 0;
- }
+ public int getQueuedByteCount() { return 0; }
@Override
- public float getQueuedTime() {
- return 0f;
- }
+ public float getQueuedTime() { return 0f; }
@Override
- public float getAvgFrameDuration() {
- return 0f;
- }
+ public float getAvgFrameDuration() { return 0f; }
@Override
public final int getPTS() { return playingPTS; }
@Override
- public int getFreeFrameCount() {
- return 1;
- }
+ public int getLastBufferedPTS() { return 0; }
+
+ @Override
+ public int getFreeFrameCount() { return 1; }
@Override
public AudioFrame enqueueData(final int pts, final ByteBuffer bytes, final int byteCount) {