diff --git a/doc/notes/3.3.2.md b/doc/notes/3.3.2.md index 4641124334..ff359137df 100644 --- a/doc/notes/3.3.2.md +++ b/doc/notes/3.3.2.md @@ -32,6 +32,7 @@ This build includes the following changes: - Core: Fixed Java/native library incompatibility detection. (#737) - Core: Fixed `dlerror` decoding to use UTF-8. (#738) - Build: Fixed offline mode with multiple local architectures. (#740) +- Opus: Fixed `pcm` parameter type of `opus_decode_float` function. (#785) - Vulkan: Fixed definition of the `VK_API_VERSION_PATCH` macro. (#743) - Vulkan: Fixed `EXT_debug_utils` function dispatch. (#755) diff --git a/modules/lwjgl/opus/src/generated/java/org/lwjgl/util/opus/Opus.java b/modules/lwjgl/opus/src/generated/java/org/lwjgl/util/opus/Opus.java index 624ab6e53c..f6a9ccf530 100644 --- a/modules/lwjgl/opus/src/generated/java/org/lwjgl/util/opus/Opus.java +++ b/modules/lwjgl/opus/src/generated/java/org/lwjgl/util/opus/Opus.java @@ -876,7 +876,7 @@ public static int nopus_decode_float(long st, long data, int len, long pcm, int * * @param st decoder state * @param data input payload (Use a {@code NULL} pointer to indicate packet loss) - * @param pcm output signal (interleaved if 2 channels) (length is {@code frame_size*channels*sizeof(opus_int16)} + * @param pcm output signal (interleaved if 2 channels) (length is {@code frame_size*channels*sizeof(float)} * @param frame_size number of samples per channel of available space in pcm. * *

If this is less than the maximum packet duration (120ms; 5760 for 48kHz), this function will not be capable of decoding some packets. In the case @@ -888,7 +888,7 @@ public static int nopus_decode_float(long st, long data, int len, long pcm, int * * @return number of decoded samples or a negative error code */ - public static int opus_decode_float(@NativeType("OpusDecoder *") long st, @Nullable @NativeType("unsigned char const *") ByteBuffer data, @NativeType("opus_int16 *") ShortBuffer pcm, int frame_size, int decode_fec) { + public static int opus_decode_float(@NativeType("OpusDecoder *") long st, @Nullable @NativeType("unsigned char const *") ByteBuffer data, @NativeType("float *") FloatBuffer pcm, int frame_size, int decode_fec) { if (CHECKS) { check(pcm, frame_size * memGetInt(st + 8)); } diff --git a/modules/lwjgl/opus/src/templates/kotlin/opus/templates/Opus.kt b/modules/lwjgl/opus/src/templates/kotlin/opus/templates/Opus.kt index 34ace38bac..759f5d905b 100644 --- a/modules/lwjgl/opus/src/templates/kotlin/opus/templates/Opus.kt +++ b/modules/lwjgl/opus/src/templates/kotlin/opus/templates/Opus.kt @@ -622,7 +622,7 @@ if (nb_packets > 0) Check( // Reading OpusDecoder internal state here "frame_size * memGetInt(st + 8)" - )..opus_int16.p("pcm", "output signal (interleaved if 2 channels) (length is {@code frame_size*channels*sizeof(opus_int16)}"), + )..float.p("pcm", "output signal (interleaved if 2 channels) (length is {@code frame_size*channels*sizeof(float)}"), int( "frame_size", """