diff --git a/src/main/java/com/eimsound/dsp/timestretchers/NativeFFT.java b/src/main/java/com/eimsound/dsp/timestretchers/NativeFFT.java index fd7f2e5..61f9344 100644 --- a/src/main/java/com/eimsound/dsp/timestretchers/NativeFFT.java +++ b/src/main/java/com/eimsound/dsp/timestretchers/NativeFFT.java @@ -208,7 +208,8 @@ public int getSize() { public static String getDefaultImplementation() { init(); try { - return ((MemorySegment) fft_get_default_implementation.invokeExact()).getUtf8String(0L); + return ((MemorySegment) fft_get_default_implementation.invokeExact()) + .reinterpret(255).getUtf8String(0L); } catch (Throwable e) { throw new RuntimeException(e); } diff --git a/src/main/java/com/eimsound/dsp/timestretchers/NativeResampler.java b/src/main/java/com/eimsound/dsp/timestretchers/NativeResampler.java index ba658e0..75fed5d 100644 --- a/src/main/java/com/eimsound/dsp/timestretchers/NativeResampler.java +++ b/src/main/java/com/eimsound/dsp/timestretchers/NativeResampler.java @@ -158,7 +158,8 @@ public void reset() { public static String getImplementation() { init(); try { - return ((MemorySegment) resampler_get_implementation.invokeExact()).getUtf8String(0L); + return ((MemorySegment) resampler_get_implementation.invokeExact()) + .reinterpret(255).getUtf8String(0L); } catch (Throwable e) { throw new RuntimeException(e); } diff --git a/src/main/java/com/eimsound/dsp/timestretchers/NativeTimeStretcher.java b/src/main/java/com/eimsound/dsp/timestretchers/NativeTimeStretcher.java index bd64c2c..187c863 100644 --- a/src/main/java/com/eimsound/dsp/timestretchers/NativeTimeStretcher.java +++ b/src/main/java/com/eimsound/dsp/timestretchers/NativeTimeStretcher.java @@ -139,7 +139,8 @@ private static void init() { public static String @NotNull [] getAllTimeStretcherNames() { init(); try { - return ((MemorySegment) get_all_time_stretchers.invokeExact()).getUtf8String(0L).split(","); + return ((MemorySegment) get_all_time_stretchers.invokeExact()) + .reinterpret(255).getUtf8String(0L).split(","); } catch (Throwable e) { throw new RuntimeException(e); }