summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Sinclair <radarsat1@gmail.com>2017-10-18 12:00:00 -0300
committerStephen Sinclair <radarsat1@gmail.com>2017-10-18 17:33:01 -0300
commit3b1331c16ed513ec92f41d13692bcbe1792c3d1a (patch)
treed842f7faa2d245a120721b9d352e26b752d45eb9
parent0645e8f4669293e388da44aeeb3f4c05f3d087b8 (diff)
Fix compilation of ASIO and WASAPI backends in MingW/Ubuntu.
Warnings/errors "unused function" are from the unicode conversion functions on Windows, and "unused but set variable" is from ASIO source code; we disable these warnings on Windows builds.
-rw-r--r--.travis.yml16
-rw-r--r--Makefile.am8
-rw-r--r--RtAudio.cpp2
-rw-r--r--configure.ac2
4 files changed, 15 insertions, 13 deletions
diff --git a/.travis.yml b/.travis.yml
index 41f8e6d..c9afc3a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -30,28 +30,28 @@ matrix:
env: HOST="" API="oss"
compiler: clang
- os: linux
- env: HOST="--host=i686-w64-mingw32" API="winmm"
+ env: HOST="--host=i686-w64-mingw32" API="winmm" CPPFLAGS="-Wno-unused-function"
compiler: gcc
- os: linux
- env: HOST="--host=x86_64-w64-mingw32" API="winmm"
+ env: HOST="--host=x86_64-w64-mingw32" API="winmm" CPPFLAGS="-Wno-unused-function"
compiler: gcc
- os: linux
- env: HOST="--host=i686-w64-mingw32" API="dsound"
+ env: HOST="--host=i686-w64-mingw32" API="dsound" CPPFLAGS="-Wno-unused-function"
compiler: gcc
- os: linux
- env: HOST="--host=x86_64-w64-mingw32" API="dsound"
+ env: HOST="--host=x86_64-w64-mingw32" API="dsound" CPPFLAGS="-Wno-unused-function"
compiler: gcc
- os: linux
- env: HOST="--host=i686-w64-mingw32" API="asio"
+ env: HOST="--host=i686-w64-mingw32" API="asio" CPPFLAGS="-Wno-unused-function -Wno-unused-but-set-variable"
compiler: gcc
- os: linux
- env: HOST="--host=x86_64-w64-mingw32" API="asio"
+ env: HOST="--host=x86_64-w64-mingw32" API="asio" CPPFLAGS="-Wno-unused-function -Wno-unused-but-set-variable"
compiler: gcc
- os: linux
- env: HOST="--host=i686-w64-mingw32" API="wasapi"
+ env: HOST="--host=i686-w64-mingw32" API="wasapi" CPPFLAGS="-Wno-unused-function"
compiler: gcc
- os: linux
- env: HOST="--host=x86_64-w64-mingw32" API="wasapi"
+ env: HOST="--host=x86_64-w64-mingw32" API="wasapi" CPPFLAGS="-Wno-unused-function"
compiler: gcc
# jack and asound not found on ARM gnueabihf
# - os: linux
diff --git a/Makefile.am b/Makefile.am
index ffb1601..f83007c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,10 +13,10 @@ lib_LTLIBRARIES = %D%/librtaudio.la
if ASIO
%C%_librtaudio_la_SOURCES += \
- asio.cpp \
- asiodrivers.cpp \
- asiolist.cpp \
- iasiothiscallresolver.cpp
+ include/asio.cpp \
+ include/asiodrivers.cpp \
+ include/asiolist.cpp \
+ include/iasiothiscallresolver.cpp
endif
rtaudio_incdir = $(includedir)/rtaudio
diff --git a/RtAudio.cpp b/RtAudio.cpp
index d2ac6b9..1110394 100644
--- a/RtAudio.cpp
+++ b/RtAudio.cpp
@@ -4458,7 +4458,7 @@ bool RtApiWasapi::probeDeviceOpen( unsigned int device, StreamMode mode, unsigne
if ( sampleRate != deviceInfo.preferredSampleRate )
{
errorType = RtAudioError::INVALID_USE;
- std::stringstring ss;
+ std::stringstream ss;
ss << "RtApiWasapi::probeDeviceOpen: " << sampleRate
<< "Hz sample rate not supported. This device only supports "
<< deviceInfo.preferredSampleRate << "Hz.";
diff --git a/configure.ac b/configure.ac
index 893a71a..991cbec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -226,6 +226,7 @@ AS_CASE([$host],
AC_MSG_RESULT([using ASIO])
api="$api -D__WINDOWS_ASIO__"
use_asio=yes
+ CPPFLAGS="-I$srcdir/include $CPPFLAGS"
])
# Look for DirectSound flag
AS_IF([test "x$with_ds" = "xyes" ], [
@@ -238,6 +239,7 @@ AS_CASE([$host],
AC_MSG_RESULT([using WASAPI])
api="$api -D__WINDOWS_WASAPI__"
LIBS="-lwinmm -luuid -lksuser $LIBS"
+ CPPFLAGS="-I$srcdir/include $CPPFLAGS"
])
# If no audio api flags specified, use DS
AS_IF([test "x$api" = "x" ], [