Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions src/main/native/opus/Makefile.windows10.amd64
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# -*-makefile-*-

CC=gcc
JAVA = java-8-openjdk-amd64
NATIVE = ../../resources/native/WINDOW~1/amd64/
INCLUDES = -IC:/PROGRA~1/Java/jdk1.8.0_144/include\
-IC:/PROGRA~1/Java/jdk1.8.0_144/include/win32\
-I/usr/local/include
CFLAGS = -Ofast -Wall -fPIC $(INCLUDES)
LDFLAGS = -Wl,-soname,libjni_opus.dll,-rpath='$$ORIGIN' -shared
LDPATH = -L$(NATIVE)
LIBS = -lopus -lspeex -lspeexdsp
SOURCES = za_co_monadic_scopus_opus_Opus__.c za_co_monadic_scopus_speex_Speex__.c
TARGETLIB = libjni_opus.dll

all: libjni_opus.dll

clean:
rm -f *.o *~ $(TARGETLIB)

$(TARGETLIB) : $(SOURCES:.c=.o)
$(CC) $(LDFLAGS) $(LDPATH) -o $@ $^ $(LIBS)

install: $(TARGETLIB)
cp $(TARGETLIB) $(NATIVE)

.c.o:
$(CC) -c $(CFLAGS) $< -o $@
4 changes: 2 additions & 2 deletions src/main/native/opus/za_co_monadic_scopus_opus_Opus__.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ JNIEXPORT jint JNICALL Java_za_co_monadic_scopus_opus_Opus_00024_encoder_1set_1c
}

JNIEXPORT jstring JNICALL Java_za_co_monadic_scopus_opus_Opus_00024_error_1string
(JNIEnv *env, jobject clazz, jint errno) {
const char *err_str = opus_strerror(errno);
(JNIEnv *env, jobject clazz, jint errorno) {
const char *err_str = opus_strerror(errorno);
return (*env)->NewStringUTF(env, err_str);
}

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 5 additions & 0 deletions src/main/scala/za/co/monadic/scopus/Libraries.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ object Libraries {
LibLoader("libspeex.1.dylib", load = false)
LibLoader("libspeexdsp.1.dylib", load = false)
LibLoader("libjni_opus.dylib")
case "Windows 10/amd64" =>
LibLoader("libopus-0.dll")
LibLoader("libspeex-1.dll")
LibLoader("libspeexdsp-1.dll")
LibLoader("libjni_opus.dll")
case s: String =>
println(s"Unknown OS/platform combination: $s")
sys.exit(-1)
Expand Down