aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/openal/util/SimpleSineSynth.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-10-15 06:44:59 +0200
committerSven Gothel <[email protected]>2023-10-15 06:44:59 +0200
commit12029f1ec1d8afa576e1ac61655f318cc37c1d16 (patch)
treea657562bc4257be903bdc668a61bc74d04bc6793 /src/java/com/jogamp/openal/util/SimpleSineSynth.java
parentd3de587eae8ed8b5b5bc62647da0f95297144294 (diff)
Bug 1472: Enhance AV Sync: Pass through PTS object in ALAudioSink, tracking last PTS value against System Clock Reference (SCR)
See GlueGen commit 52725b4c6525487f93407f529dc0a758b387a4fc
Diffstat (limited to 'src/java/com/jogamp/openal/util/SimpleSineSynth.java')
-rw-r--r--src/java/com/jogamp/openal/util/SimpleSineSynth.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/java/com/jogamp/openal/util/SimpleSineSynth.java b/src/java/com/jogamp/openal/util/SimpleSineSynth.java
index c485f69..01291e1 100644
--- a/src/java/com/jogamp/openal/util/SimpleSineSynth.java
+++ b/src/java/com/jogamp/openal/util/SimpleSineSynth.java
@@ -32,6 +32,7 @@ import java.nio.FloatBuffer;
import com.jogamp.common.av.AudioFormat;
import com.jogamp.common.av.AudioSink;
+import com.jogamp.common.av.PTS;
import com.jogamp.common.nio.Buffers;
import com.jogamp.common.os.Platform;
import com.jogamp.common.util.InterruptSource;
@@ -148,12 +149,12 @@ public final class SimpleSineSynth {
public int getNextPTS() { return nextAudioPTS; }
- public int getPTS() { return audioSink.getPTS(); }
+ public PTS getPTS() { return audioSink.getPTS(); }
@Override
public final String toString() {
synchronized( stateLock ) {
- final int pts = getPTS();
+ final int pts = getPTS().getLast();
final int lag = getNextPTS() - pts;
return getClass().getSimpleName()+"[f "+audioFreq+", a "+audioAmplitude+", latency "+getLatency()+
", state[running "+isRunning()+", playing "+isPlaying()+"], pts[next "+getNextPTS()+", play "+pts+", lag "+lag+"], "+audioSink.toString()+"]";