diff options
author | Sven Gothel <[email protected]> | 2023-10-06 12:21:08 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-10-06 12:21:08 +0200 |
commit | dbd0236203f3d969575e62097f42a2a86e2a36ae (patch) | |
tree | 02ac1a1d9f3aa4a398c96fead906ebd2559d3ac5 /src/java/com/jogamp/common | |
parent | 8376f21f2b6f25f3fc8ff2688ef49a2e9c91f966 (diff) |
AudioSink: Rename getQueued{Time->Duration}(), add updateQueue()
Diffstat (limited to 'src/java/com/jogamp/common')
-rw-r--r-- | src/java/com/jogamp/common/av/AudioSink.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/java/com/jogamp/common/av/AudioSink.java b/src/java/com/jogamp/common/av/AudioSink.java index f3ed5a8..6f36e6f 100644 --- a/src/java/com/jogamp/common/av/AudioSink.java +++ b/src/java/com/jogamp/common/av/AudioSink.java @@ -392,12 +392,12 @@ public interface AudioSink { * </p> * @see #init(AudioFormat, float, int) */ - public float getQueuedTime(); + public float getQueuedDuration(); /** * Returns average frame duration last assessed @ {@link #enqueueData(int, ByteBuffer, int)} when queue was full. * <pre> - * avgFrameDuration = {@link #getQueuedTime()} / {@link #getQueuedFrameCount()} + * avgFrameDuration = {@link #getQueuedDuration()} / {@link #getQueuedFrameCount()} * </pre> */ public float getAvgFrameDuration(); @@ -446,4 +446,16 @@ public interface AudioSink { * @see #init(AudioFormat, float, int) */ public AudioFrame enqueueData(int pts, ByteBuffer bytes, int byteCount); + + /** + * Update queue beyond {@link #enqueueData(int, ByteBuffer, int)} including audio PTS. + * <p> + * Useful in case implementation only updates the buffer passively via {@link #enqueueData(int, ByteBuffer, int) enqueueing data} + * to add new data to the queue and not on a event basis. + * </p> + * @return the updated current audio PTS + * @see #getPTS() + * @see #enqueueData(int, ByteBuffer, int) + */ + public int updateQueue(); } |