diff options
author | Sven Gothel <[email protected]> | 2023-05-23 02:13:08 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-05-23 02:13:08 +0200 |
commit | b294b6e4f9a3dc24bcdce28f0a9c45eda8755f1f (patch) | |
tree | 1b7e5473ed3786c41419b7d1e6ce2f8b7fe8e9d3 /src/jogl/classes/com/jogamp/opengl | |
parent | 55fb624ac388a88c068bd9f9e7cc3164458d6201 (diff) |
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.
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java | 15 |
1 files changed, 15 insertions, 0 deletions
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; @@ -419,6 +420,20 @@ public interface GLMediaPlayer extends TextureSequence { public void setTextureWrapST(int[] wrapST); /** + * Limit maximum supported audio channels by user. + * <p> + * Must be set before {@link #playStream(Uri, int, int, int)} + * </p> + * <p> + * May be utilized to enforce 1 channel (mono) downsampling + * in combination with JOAL/OpenAL to experience spatial 3D position effects. + * </p> + * @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. * <p> * <a href="#lifecycle">Lifecycle</a>: {@link State#Uninitialized} -> {@link State#Initialized}<sup><a href="#streamworker">1</a></sup> or {@link State#Uninitialized} |