From 083e996ae652f7ddf07530d99ce0007283a2ba0d Mon Sep 17 00:00:00 2001 From: sh123 Date: Sat, 9 Dec 2023 16:34:51 +0200 Subject: [PATCH] Update Opus.java with defines --- .../src/main/java/com/radio/opus/Opus.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/libopus-android/src/main/java/com/radio/opus/Opus.java b/libopus-android/src/main/java/com/radio/opus/Opus.java index 0f65313..aeb6b3d 100644 --- a/libopus-android/src/main/java/com/radio/opus/Opus.java +++ b/libopus-android/src/main/java/com/radio/opus/Opus.java @@ -9,6 +9,23 @@ public class Opus { System.loadLibrary("opus"); System.loadLibrary("OpusJNI"); } + + // application + public static final int OPUS_APPLICATION_VOIP = 2048; + public static final int OPUS_APPLICATION_AUDIO = 2049; + public static final int OPUS_APPLICATION_RESTRICTED_LOWDELAY = 2051; + + // frame sizes + public static final int OPUS_FRAMESIZE_2_5_MS = 5001; /**< Use 2.5 ms frames */ + public static final int OPUS_FRAMESIZE_5_MS = 5002; /**< Use 5 ms frames */ + public static final int OPUS_FRAMESIZE_10_MS = 5003; /**< Use 10 ms frames */ + public static final int OPUS_FRAMESIZE_20_MS = 5004; /**< Use 20 ms frames */ + public static final int OPUS_FRAMESIZE_40_MS = 5005; /**< Use 40 ms frames */ + public static final int OPUS_FRAMESIZE_60_MS = 5006; /**< Use 60 ms frames */ + public static final int OPUS_FRAMESIZE_80_MS = 5007; /**< Use 80 ms frames */ + public static final int OPUS_FRAMESIZE_100_MS = 5008; /**< Use 100 ms frames */ + public static final int OPUS_FRAMESIZE_120_MS = 5009; /**< Use 120 ms frames */ + public native static long create(int sampleRate, int numChannels, int application, int bitrate, int complexity); public native static int destroy(long con);