diff --git a/.gitignore b/.gitignore index da64042..fcad177 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .build .DS_Store +DerivedData +.swiftpm diff --git a/Package.swift b/Package.swift index bb2b5a8..a920762 100644 --- a/Package.swift +++ b/Package.swift @@ -14,6 +14,10 @@ let package = Package( name: "Copus", targets: ["Copus"] ), + .library( + name: "Copus-wrapper", + targets: ["Copus-wrapper"] + ), .library( name: "Opus", targets: ["Opus", "Copus"] @@ -28,6 +32,8 @@ let package = Package( "AUTHORS", "autogen.sh", "celt/arm", + "celt_headers.mk", + "celt_sources.mk", "celt/dump_modes", "celt/meson.build", "celt/opus_custom_demo.c", @@ -50,6 +56,8 @@ let package = Package( "meson.build", "meson", "NEWS", + "opus_headers.mk", + "opus_sources.mk", "opus-uninstalled.pc.in", "opus.m4", "opus.pc.in", @@ -102,9 +110,13 @@ let package = Package( .define("HAVE_UNISTD_H", to: "1"), ] ), + .target( + name: "Copus-wrapper", + dependencies: ["Copus"] + ), .target( name: "Opus", - dependencies: ["Copus"] + dependencies: ["Copus", "Copus-wrapper"] ), .testTarget( name: "OpusTests", diff --git a/Sources/Copus-wrapper/variadic-wrapper.c b/Sources/Copus-wrapper/variadic-wrapper.c index 66f1974..15503e0 100644 --- a/Sources/Copus-wrapper/variadic-wrapper.c +++ b/Sources/Copus-wrapper/variadic-wrapper.c @@ -1,11 +1,11 @@ #include "variadic-wrapper.h" -int opus_custom_encoder_ctl_wrapper(CELTEncoder *OPUS_RESTRICT st, int request, opus_int32 val) +int opus_custom_encoder_ctl_wrapper(OpusCustomEncoder *OPUS_RESTRICT st, int request, opus_int32 val) { opus_custom_encoder_ctl(st, request, val); } -int opus_custom_decoder_ctl_wrapper(CELTEncoder *OPUS_RESTRICT st, int request, opus_int32 val) +int opus_custom_decoder_ctl_wrapper(OpusCustomDecoder *OPUS_RESTRICT st, int request, opus_int32 val) { opus_custom_decoder_ctl(st, request, val); } diff --git a/Sources/Copus-wrapper/variadic-wrapper.h b/Sources/Copus-wrapper/variadic-wrapper.h index e04008e..747a477 100644 --- a/Sources/Copus-wrapper/variadic-wrapper.h +++ b/Sources/Copus-wrapper/variadic-wrapper.h @@ -1,11 +1,11 @@ #ifndef __OPUS_VARIADIC_WRAPPER_H__ #define __OPUS_VARIADIC_WRAPPER_H__ -#include +//#include "" #include #include -int opus_custom_encoder_ctl_wrapper(CELTEncoder *OPUS_RESTRICT st, int request, opus_int32 val); -int opus_custom_decoder_ctl_wrapper(CELTEncoder *OPUS_RESTRICT st, int request, opus_int32 val); +int opus_custom_encoder_ctl_wrapper(OpusCustomEncoder *OPUS_RESTRICT st, int request, opus_int32 val); +int opus_custom_decoder_ctl_wrapper(OpusCustomDecoder *OPUS_RESTRICT st, int request, opus_int32 val); #endif