From 44649fe486889b7b65ba247126a4e9446f342053 Mon Sep 17 00:00:00 2001 From: f4exb Date: Mon, 18 Feb 2019 13:19:47 +0100 Subject: [PATCH] Windows build fixes for G722 and Opus codecs --- sdrbase/audio/audiofilter.cpp | 1 + sdrbase/audio/audiog722.h | 2 +- sdrbase/sdrbase.pro | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sdrbase/audio/audiofilter.cpp b/sdrbase/audio/audiofilter.cpp index 980df959a..1f61569eb 100644 --- a/sdrbase/audio/audiofilter.cpp +++ b/sdrbase/audio/audiofilter.cpp @@ -14,6 +14,7 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// +#define _USE_MATH_DEFINES #include #include #include diff --git a/sdrbase/audio/audiog722.h b/sdrbase/audio/audiog722.h index ee88e264c..59e199913 100644 --- a/sdrbase/audio/audiog722.h +++ b/sdrbase/audio/audiog722.h @@ -71,7 +71,7 @@ private: void init(int rate, int options); }; - __inline__ int16_t saturate(int32_t amp) + int16_t saturate(int32_t amp) { int16_t amp16; diff --git a/sdrbase/sdrbase.pro b/sdrbase/sdrbase.pro index e06c4b82a..0a295936d 100644 --- a/sdrbase/sdrbase.pro +++ b/sdrbase/sdrbase.pro @@ -37,6 +37,7 @@ CONFIG(ANDROID):INCLUDEPATH += /opt/softs/boost_1_60_0 CONFIG(MINGW32):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MINGW64):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MSVC):INCLUDEPATH += "C:\softs\boost_1_66_0" +CONFIG(MSVC):INCLUDEPATH += "C:\softs\libopus_v1.3_msvc15\include" CONFIG(MINGW32):INCLUDEPATH += "C:\softs\serialDV" CONFIG(MINGW64):INCLUDEPATH += "C:\softs\serialDV" @@ -58,6 +59,7 @@ SOURCES += audio/audiodevicemanager.cpp\ audio/audiofifo.cpp\ audio/audiofilter.cpp\ audio/audiog722.cpp\ + audio/audioopus.cpp\ audio/audiooutput.cpp\ audio/audioinput.cpp\ audio/audionetsink.cpp\ @@ -138,6 +140,7 @@ HEADERS += audio/audiodevicemanager.h\ audio/audiofifo.h\ audio/audiofilter.h\ audio/audiog722.h\ + audio/audioopus.h\ audio/audiooutput.h\ audio/audioinput.h\ audio/audionetsink.h\ @@ -231,6 +234,9 @@ HEADERS += audio/audiodevicemanager.h\ webapi/webapiserver.h\ mainparser.h +MSVC { + LIBS += -LC:\softs\libopus_v1.3_msvc15\lib\x64 -lopus +} MINGW32 || MINGW64 || MSVC { LIBS += -L../serialdv/$${build_subdir} -lserialdv }