Browse Source

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.
tags/5.1.0
Stephen Sinclair 7 years ago
parent
commit
3b1331c16e
4 changed files with 15 additions and 13 deletions
  1. +8
    -8
      .travis.yml
  2. +4
    -4
      Makefile.am
  3. +1
    -1
      RtAudio.cpp
  4. +2
    -0
      configure.ac

+ 8
- 8
.travis.yml View File

@@ -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


+ 4
- 4
Makefile.am View File

@@ -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


+ 1
- 1
RtAudio.cpp View File

@@ -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.";


+ 2
- 0
configure.ac View File

@@ -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" ], [


Loading…
Cancel
Save