Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
ShirasawaSama committed Dec 11, 2023
1 parent 19607b5 commit eafe804
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/main/java/com/eimsound/dsp/timestretchers/NativeLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ final class NativeLibrary {
private static SymbolLookup lookup;

static {
fileName = "libEIMTimeStretchers" + switch (System.getProperty("os.name")) {
case "Mac OS X" -> System.getProperty("os.arch", "").equals("aarch64") ? ".dylib" : "-x86.dylib";
case "Linux" -> ".so";
case "Windows" -> ".dll";
default -> throw new RuntimeException("Unsupported OS");
};
var os = System.getProperty("os.name");
var ext = "";
if (os.startsWith("Windows")) ext = ".dll";
else if ("Mac OS X".equalsIgnoreCase(os)) {
ext = System.getProperty("os.arch", "").equals("aarch64") ? ".dylib" : "-x86.dylib";
} else ext = ".so";
fileName = "libEIMTimeStretchers" + ext;
}

static SymbolLookup getLookup() {
Expand Down

0 comments on commit eafe804

Please sign in to comment.