aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-05-21 16:50:16 +0200
committerSven Gothel <[email protected]>2023-05-21 16:50:16 +0200
commit39a32fd56de313c31bd197ee6022288e97f9729a (patch)
treef10177cf42c55f7c4fa443c95eb7bd689ce93a0f /src/test/com
parent57f94e84a9ebfc04f8f04593acc12f3fdc56eddc (diff)
ALAudioSink: Use float in seconds for duration (AudioFormat and 'avgFrameDuration') to avoid losing precision when dealing with stats, averages etc
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/openal/test/manual/Synth02AL.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/com/jogamp/openal/test/manual/Synth02AL.java b/src/test/com/jogamp/openal/test/manual/Synth02AL.java
index b7c7136..cdba19b 100644
--- a/src/test/com/jogamp/openal/test/manual/Synth02AL.java
+++ b/src/test/com/jogamp/openal/test/manual/Synth02AL.java
@@ -208,7 +208,7 @@ public final class Synth02AL {
}
System.err.println("OpenAL float32 supported: "+useFloat32SampleType);
- sampleBuffer = allocate( audioFormat.getDurationsByteSize(30) ); // pre-allocate buffer for 30ms
+ sampleBuffer = allocate( audioFormat.getDurationsByteSize(30/1000f) ); // pre-allocate buffer for 30ms
// clip [16 .. 2*AudioSink.DefaultFrameDuration]
frameDuration = Math.max( 16, Math.min(2*AudioSink.DefaultFrameDuration, Math.round( 1000f*audioSink.getDefaultLatency() ) ) ); // ms