diff options
author | Sven Gothel <[email protected]> | 2023-05-18 04:13:57 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-05-18 04:13:57 +0200 |
commit | d5daaaab3544d9af49056f57a1fcf53abef17deb (patch) | |
tree | 47d664d81f6262596d148e8dda4f8052aea2872d /src/test | |
parent | 5320233de825b5e3c2131c9303ef94990a40fcb4 (diff) |
ALAudioSink: Promote to public, be fully functional regarding AudioFormat and OpenAL paremeter. Can be 'plugged' into existing OpenAL logic.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/com/jogamp/openal/test/manual/Synth02AL.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/com/jogamp/openal/test/manual/Synth02AL.java b/src/test/com/jogamp/openal/test/manual/Synth02AL.java index 1059794..939dba3 100644 --- a/src/test/com/jogamp/openal/test/manual/Synth02AL.java +++ b/src/test/com/jogamp/openal/test/manual/Synth02AL.java @@ -33,6 +33,7 @@ import java.io.InputStreamReader; import java.nio.ByteBuffer; import java.util.concurrent.TimeUnit; +import com.jogamp.common.av.AudioFormat; import com.jogamp.common.av.AudioSink; import com.jogamp.common.av.AudioSinkFactory; import com.jogamp.common.nio.Buffers; @@ -166,7 +167,7 @@ public final class Synth02AL { private volatile boolean shallStop = false; private final AudioSink audioSink; - private final AudioSink.AudioFormat audioFormat; + private final AudioFormat audioFormat; private ByteBuffer sampleBuffer = allocate(2*1000); private float lastFreq; private float nextSin; @@ -184,7 +185,7 @@ public final class Synth02AL { synchronized(this) { lastAudioPTS = 0; audioSink = AudioSinkFactory.createDefault(Synth02AL.class.getClassLoader()); - audioFormat = new AudioSink.AudioFormat(audioSink.getPreferredSampleRate(), 16, 1, true /* signed */, + audioFormat = new AudioFormat(audioSink.getPreferredSampleRate(), 16, 1, true /* signed */, true /* fixed point */, false /* planar */, true /* littleEndian */); audioSink.init(audioFormat, frameDuration, audioQueueLimit, 0, audioQueueLimit); lastFreq = 0; |