summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/openal/JoalVersion.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-05-20 04:16:26 +0200
committerSven Gothel <[email protected]>2023-05-20 04:16:26 +0200
commitdc6c3901e345c72ec028cc06952e3e243067f949 (patch)
tree672f5abbe84a243610b4fa33539bbfdd85a0633a /src/java/com/jogamp/openal/JoalVersion.java
parent55caa3fb79352f85d52804bcf354c66e85a05071 (diff)
JoalVersion: Cleanup dead branches
Diffstat (limited to 'src/java/com/jogamp/openal/JoalVersion.java')
-rw-r--r--src/java/com/jogamp/openal/JoalVersion.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/java/com/jogamp/openal/JoalVersion.java b/src/java/com/jogamp/openal/JoalVersion.java
index 2edaf7c..f2ffc48 100644
--- a/src/java/com/jogamp/openal/JoalVersion.java
+++ b/src/java/com/jogamp/openal/JoalVersion.java
@@ -148,15 +148,16 @@ public class JoalVersion extends JogampVersion {
}
public static void deviceToString(final StringBuilder sb, final ALC alc, final String devName, final boolean isInput, final String defOutDeviceName, final String defInDeviceName) {
- final boolean isDefault = isInput ? devName.equals(defInDeviceName) : devName.equals(defOutDeviceName);
- final String defStr = isDefault ? "default " : "";
if( isInput ) {
+ final boolean isDefault = devName.equals(defInDeviceName);
sb.append(" "+devName+", input, default "+isDefault+System.lineSeparator());
} else {
+ final boolean isDefault = devName.equals(defOutDeviceName);
+ final String defStr = isDefault ? "default " : "";
final String inOutStr = "output";
final int mixerFrequency, mixerRefresh, monoSourceCount, stereoSourceCount;
final int[] val = { 0 };
- final ALCdevice d = isInput ? null : alc.alcOpenDevice(devName);
+ final ALCdevice d = alc.alcOpenDevice(devName);
if( null == d ) {
System.err.println("Error: Failed to open "+defStr+inOutStr+" device "+devName);
return;
@@ -217,11 +218,7 @@ public class JoalVersion extends JogampVersion {
alc.alcMakeContextCurrent(null);
alc.alcDestroyContext(c);
- if( isInput ) {
- alc.alcCaptureCloseDevice(d);
- } else {
- alc.alcCloseDevice(d);
- }
+ alc.alcCloseDevice(d);
}
}