diff options
author | Sven Gothel <[email protected]> | 2023-05-23 01:37:01 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-05-23 01:37:01 +0200 |
commit | 6a74d16a805a4204093972bb91361b2aa633065c (patch) | |
tree | 22c8c3e8efc7a69dff73c87e8d2e54ff65591839 /src/java/jogamp/common/av/NullAudioSink.java | |
parent | c04726720a57f8db42f2621ad58ff3bd42006c63 (diff) |
AudioSink: Drop getMaxSupportedChannels(), use getNativeFormat(), getPreferredFormat() and isSupported(); Add setChannelLimit() impacting
Add setChannelLimit() impacting getPreferredFormat() and isSupported(),
i.e. to limit channels for e.g. JOAL/OpenAL spatial 3D sound usage.
getNativeFormat() shall be unaffected.
getMaxSupportedChannels() is redudandant -> getPreferredFormat()
Diffstat (limited to 'src/java/jogamp/common/av/NullAudioSink.java')
-rw-r--r-- | src/java/jogamp/common/av/NullAudioSink.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/java/jogamp/common/av/NullAudioSink.java b/src/java/jogamp/common/av/NullAudioSink.java index 19b0acb..904b863 100644 --- a/src/java/jogamp/common/av/NullAudioSink.java +++ b/src/java/jogamp/common/av/NullAudioSink.java @@ -84,11 +84,6 @@ public final class NullAudioSink implements AudioSink { } @Override - public int getPreferredSampleRate() { - return DefaultFormat.sampleRate; - } - - @Override public int getSourceCount() { return -1; } @@ -104,16 +99,19 @@ public final class NullAudioSink implements AudioSink { } @Override - public AudioFormat getPreferredFormat() { + public AudioFormat getNativeFormat() { return DefaultFormat; } @Override - public final int getMaxSupportedChannels() { - return 8; + public AudioFormat getPreferredFormat() { + return DefaultFormat; } @Override + public void setChannelLimit(final int cc) { } + + @Override public final boolean isSupported(final AudioFormat format) { /** * If we like to emulate constraints .. |