diff options
author | Sven Gothel <[email protected]> | 2023-05-21 16:44:17 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-05-21 16:44:17 +0200 |
commit | 742cf0cd053f968cbf291ed367d4568c12d8bde2 (patch) | |
tree | 6036ad8cdabf04ebf90988eb81a466c39d6b7d9c /src/java/com/jogamp/common/av/TimeFrameI.java | |
parent | 5c33470aea6b30c81681992567d7c92e100bdab3 (diff) |
AudioFormat/AudioSink: Use float in seconds for duration to avoid losing precision when dealing with stats, averages etc
Diffstat (limited to 'src/java/com/jogamp/common/av/TimeFrameI.java')
-rw-r--r-- | src/java/com/jogamp/common/av/TimeFrameI.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/java/com/jogamp/common/av/TimeFrameI.java b/src/java/com/jogamp/common/av/TimeFrameI.java index a528c09..400618f 100644 --- a/src/java/com/jogamp/common/av/TimeFrameI.java +++ b/src/java/com/jogamp/common/av/TimeFrameI.java @@ -56,10 +56,18 @@ public class TimeFrameI { protected int pts; protected int duration; + /** + * Ctor w/ zero duration and {@link #INVALID_PTS}. + */ public TimeFrameI() { pts = INVALID_PTS; duration = 0; } + /** + * Create a new instance + * @param pts frame pts in milliseconds + * @param duration frame duration in milliseconds + */ public TimeFrameI(final int pts, final int duration) { this.pts = pts; this.duration = duration; |