From b294b6e4f9a3dc24bcdce28f0a9c45eda8755f1f Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 23 May 2023 02:13:08 +0200 Subject: GLMediaPlayer: Add setAudioChannelLimit(..), correlating with AudioSink.setChannelLimit() .. May be utilized to enforce 1 channel (mono) downsampling in combination with JOAL/OpenAL to experience spatial 3D position effects. --- .../classes/com/jogamp/opengl/util/av/GLMediaPlayer.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/jogl/classes/com/jogamp/opengl') diff --git a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java index 3832a7c51..51724d240 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java +++ b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java @@ -35,6 +35,7 @@ import jogamp.opengl.Debug; import java.util.List; +import com.jogamp.common.av.AudioFormat; import com.jogamp.common.av.AudioSink; import com.jogamp.common.av.TimeFrameI; import com.jogamp.common.net.Uri; @@ -418,6 +419,20 @@ public interface GLMediaPlayer extends TextureSequence { /** Sets the texture min-mag filter, defaults to {@link GL#GL_CLAMP_TO_EDGE}. */ public void setTextureWrapST(int[] wrapST); + /** + * Limit maximum supported audio channels by user. + *

+ * Must be set before {@link #playStream(Uri, int, int, int)} + *

+ *

+ * May be utilized to enforce 1 channel (mono) downsampling + * in combination with JOAL/OpenAL to experience spatial 3D position effects. + *

+ * @param cc maximum supported audio channels, will be clipped [1..x], with x being the underlying audio subsystem's maximum + * @see #playStream(Uri, int, int, int) + */ + public void setAudioChannelLimit(final int cc); + /** * Issues asynchronous stream initialization. *

-- cgit v1.2.3