diff --git a/build/msvc/portaudio.sln b/build/msvc/portaudio.sln
index d4cc5dc..7933517 100644
--- a/build/msvc/portaudio.sln
+++ b/build/msvc/portaudio.sln
@@ -9,6 +9,8 @@ Global
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
+ ReleaseMinDependency|Win32 = ReleaseMinDependency|Win32
+ ReleaseMinDependency|x64 = ReleaseMinDependency|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|Win32.ActiveCfg = Debug|Win32
@@ -19,6 +21,10 @@ Global
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|Win32.Build.0 = Release|Win32
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x64.ActiveCfg = Release|x64
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x64.Build.0 = Release|x64
+ {0A18A071-125E-442F-AFF7-A3F68ABECF99}.ReleaseMinDependency|Win32.ActiveCfg = ReleaseMinDependency|Win32
+ {0A18A071-125E-442F-AFF7-A3F68ABECF99}.ReleaseMinDependency|Win32.Build.0 = ReleaseMinDependency|Win32
+ {0A18A071-125E-442F-AFF7-A3F68ABECF99}.ReleaseMinDependency|x64.ActiveCfg = ReleaseMinDependency|x64
+ {0A18A071-125E-442F-AFF7-A3F68ABECF99}.ReleaseMinDependency|x64.Build.0 = ReleaseMinDependency|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/build/msvc/portaudio.vcproj b/build/msvc/portaudio.vcproj
index d7e18f3..e969009 100644
--- a/build/msvc/portaudio.vcproj
+++ b/build/msvc/portaudio.vcproj
@@ -54,7 +54,7 @@
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..\..\src\common;..\..\include;.\;..\..\src\os\win"
- PreprocessorDefinitions="WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO"
+ PreprocessorDefinitions="WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
@@ -152,7 +152,7 @@
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..\..\src\common;..\..\include;.\;..\..\src\os\win"
- PreprocessorDefinitions="_WIN64;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_WDMKS_NO_KSGUID_LIB"
+ PreprocessorDefinitions="_WIN64;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_WDMKS_NO_KSGUID_LIB;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
@@ -247,7 +247,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\src\common;..\..\include;.\;..\..\src\os\win"
- PreprocessorDefinitions="WIN32;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO"
+ PreprocessorDefinitions="WIN32;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -272,7 +272,7 @@
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -455,6 +651,24 @@
PreprocessorDefinitions=""
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1479,6 +1897,30 @@
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/msvc/readme.txt b/build/msvc/readme.txt
index b7d2f0b..5fe5e28 100644
--- a/build/msvc/readme.txt
+++ b/build/msvc/readme.txt
@@ -1,8 +1,8 @@
Hello
This is a small list of steps in order to build portaudio
-(Currently v19-devel) into a VC6 DLL and lib file.
-This DLL contains all 3 current win32 PA APIS (MM/DS/ASIO)
+(Currently v19-devel) into a VS2005 DLL and lib file.
+This DLL contains all 5 current Win32 PA APIS (MME/DS/ASIO/WASAPI/WDMKS)
1)Copy the source dirs that comes with the ASIO SDK inside src\hostapi\asio\ASIOSDK
so you should now have example:
@@ -29,7 +29,7 @@ This DLL contains all 3 current win32 PA APIS (MM/DS/ASIO)
Processor Pack(only works with above SP5)
Latest known URL:
http://msdn2.microsoft.com/en-us/vstudio/Aa718349.aspx
- This isnt absolutely required for portaudio, but if you plan on using SSE intrinsics and similar things.
+ This isn't absolutely required for portaudio, but if you plan on using SSE intrinsics and similar things.
Up to you to decide upon Service pack 5 or 6 depending on your need for intrinsics.
Platform SDK (Feb 2003) :
@@ -51,8 +51,9 @@ This DLL contains all 3 current win32 PA APIS (MM/DS/ASIO)
*If you have 7.0(VC.NET/2001) or 7.1(VC.2003) *
then I suggest you open portaudio.dsp (and convert if needed)
- *If you have Visual Studio 2005*, I suggest you open the portaudio.sln file
- which contains 4 configurations. Win32/x64 in both Release and Debug variants
+ *If you have Visual Studio 2005 * (or later), I suggest you open the portaudio.sln file
+ which contains 2 projects (portaudio & portaudio_static) each with 6 configurations: Win32/x64 in both Debug, Release and ReleaseMinDependency,
+ last of which removes dependency of all but basic OS system DLLs.
hit compile and hope for the best.
@@ -88,22 +89,24 @@ To build PortAudio without ASIO support you need to:
B. Make sure your project doesn't try to build the PortAudio ASIO
implementation files:
- src/hostapi/pa_asio.cpp src/hostapi/iasiothiscallresolver.cpp
+ src/hostapi/pa_asio.cpp
+ src/hostapi/iasiothiscallresolver.cpp
If you're using one of the shipped projects remove them from the project.
- C. Define the PA_NO_ASIO preprocessor symbol in the project properties.
+ C. Set the PA_USE_ASIO preprocessor symbol to zero (i.e. PA_USE_ASIO=0) in the project properties.
In VS2005 this can be added under
Project Properties > Configuration Properties > C/C++ > Preprocessor > Preprocessor Definitions
- Defining PA_NO_ASIO stops src/os/win/pa_win_hostapis.c
+ Setting PA_USE_ASIO=0 stops src/os/win/pa_win_hostapis.c
from trying to initialize the PA ASIO implementation.
- D. Remove PaAsio_* entry points from portaudio.def
+ D. Remove PaAsio_* entry points from portaudio.def, or comment them out with ;
+
A similar procedure can be used to omit any of the other host APIs from the
build. The relevant preprocessor symbols used by pa_win_hostapis.c are:
-PA_NO_WMME, PA_NO_DS, PA_NO_ASIO, PA_NO_WASAPI and PA_NO_WDMKS
-
+PA_USE_WMME, PA_USE_DSOUND, PA_USE_ASIO, PA_USE_WASAPI and PA_USE_WDMKS
-----
-David Viens, davidv@plogue.com
\ No newline at end of file
+David Viens, davidv@plogue.com
+Robert Bielik, robert@xponaut.se
diff --git a/configure b/configure
index 38cea26..dcf1bda 100755
Binary files a/configure and b/configure differ
diff --git a/configure.in b/configure.in
index b1be08e..9f1061d 100644
--- a/configure.in
+++ b/configure.in
@@ -223,7 +223,7 @@ case "${host_os}" in
PADLL="portaudio.dll"
THREAD_CFLAGS="-mthreads"
SHARED_FLAGS="-shared"
- CFLAGS="$CFLAGS -I\$(top_srcdir)/include -DPA_NO_WMME -DPA_NO_ASIO -DPA_NO_WDMKS -DPA_NO_DS -DPA_NO_WASAPI"
+ CFLAGS="$CFLAGS -I\$(top_srcdir)/include -DPA_USE_WMME=0 -DPA_USE_ASIO=0 -DPA_USE_WDMKS=0 -DPA_USE_DS=0 -DPA_USE_WASAPI=0"
if [[ "x$with_directx" = "xyes" ]]; then
DXDIR="$with_dxdir"
@@ -232,7 +232,7 @@ case "${host_os}" in
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -ldsound -lole32"
#VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
#CFLAGS="$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO"
- CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/win -I$DXDIR/include -UPA_NO_DS"
+ CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/win -I$DXDIR/include -UPA_USE_DS -DPA_USE_DS=1"
fi
if [[ "x$with_asio" = "xyes" ]]; then
@@ -240,7 +240,7 @@ case "${host_os}" in
add_objects src/hostapi/asio/pa_asio.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/hostapi/asio/iasiothiscallresolver.o $ASIODIR/common/asio.o $ASIODIR/host/asiodrivers.o $ASIODIR/host/pc/asiolist.o
LIBS="-lwinmm -lm -lole32 -luuid"
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -lole32 -luuid"
- CFLAGS="$CFLAGS -ffast-math -fomit-frame-pointer -I\$(top_srcdir)/src/common -I\$(top_srcdir)/src/hostapi/asio -I$ASIODIR/host/pc -I$ASIODIR/common -I$ASIODIR/host -UPA_NO_ASIO -DWINDOWS"
+ CFLAGS="$CFLAGS -ffast-math -fomit-frame-pointer -I\$(top_srcdir)/src/common -I\$(top_srcdir)/src/hostapi/asio -I$ASIODIR/host/pc -I$ASIODIR/common -I$ASIODIR/host -UPA_USE_ASIO -DPA_USE_ASIO=1 -DWINDOWS"
CXXFLAGS="$CFLAGS"
fi
@@ -251,21 +251,21 @@ case "${host_os}" in
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32"
#VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
#CFLAGS="$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO"
- CFLAGS="$CFLAGS -I\$(top_srcdir)/src/common -I$DXDIR/include -UPA_NO_WDMKS"
+ CFLAGS="$CFLAGS -I\$(top_srcdir)/src/common -I$DXDIR/include -UPA_USE_WDMKS -DPA_USE_WDMKS=1"
fi
if [[ "x$with_wmme" = "xyes" ]]; then
add_objects src/hostapi/wmme/pa_win_wmme.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_waveformat.o
LIBS="-lwinmm -lm -lole32 -luuid"
DLL_LIBS="${DLL_LIBS} -lwinmm"
- CFLAGS="$CFLAGS -I\$(top_srcdir)/src/common -UPA_NO_WMME"
+ CFLAGS="$CFLAGS -I\$(top_srcdir)/src/common -UPA_USE_WMME -DPA_USE_WMME=1"
fi
if [[ "x$with_wasapi" = "xyes" ]]; then
add_objects src/hostapi/wasapi/pa_win_wasapi.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_waveformat.o
LIBS="-lwinmm -lm -lole32 -luuid"
DLL_LIBS="${DLL_LIBS} -lwinmm"
- CFLAGS="$CFLAGS -I\$(top_srcdir)/src/common -I\$(top_srcdir)/src/hostapi/wasapi/mingw-include -UPA_NO_WASAPI"
+ CFLAGS="$CFLAGS -I\$(top_srcdir)/src/common -I\$(top_srcdir)/src/hostapi/wasapi/mingw-include -UPA_USE_WASAPI -DPA_USE_WASAPI=1"
fi
;;
@@ -273,7 +273,7 @@ case "${host_os}" in
dnl Cygwin configuration
OTHER_OBJS="src/hostapi/wmme/pa_win_wmme.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_waveformat.o"
- CFLAGS="$CFLAGS -DPA_NO_DS -DPA_NO_WDMKS -DPA_NO_ASIO -DPA_NO_WASAPI"
+ CFLAGS="$CFLAGS -DPA_USE_DS=0 -DPA_USE_WDMKS=0 -DPA_USE_ASIO=0 -DPA_USE_WASAPI=0 -DPA_USE_WMME=1"
LIBS="-lwinmm -lm"
PADLL="portaudio.dll"
THREAD_CFLAGS="-mthreads"
diff --git a/src/common/pa_hostapi.h b/src/common/pa_hostapi.h
index 7746747..4495097 100644
--- a/src/common/pa_hostapi.h
+++ b/src/common/pa_hostapi.h
@@ -46,9 +46,59 @@
to manage and communicate with host API implementations.
*/
-
#include "portaudio.h"
+/**
+The PA_NO_* host API macros are now deprecated in favor of PA_USE_* macros.
+PA_USE_* indicates whether a particular host API will be initialized by PortAudio.
+An undefined or 0 value indicates that the host API will not be used. A value of 1
+indicates that the host API will be used. PA_USE_* macros should be left undefined
+or defined to either 0 or 1.
+
+The code below ensures that PA_USE_* macros are always defined and have value
+0 or 1. Undefined symbols are defaulted to 0. Symbols that are neither 0 nor 1
+are defaulted to 1.
+*/
+
+#if defined(PA_NO_ASIO) || defined(PA_NO_DS) || defined(PA_NO_WMME) || defined(PA_NO_WASAPI) || defined(PA_NO_WDMKS)
+#error "Portaudio: PA_NO_ is no longer supported, please remove definition and use PA_USE_ instead"
+#endif
+
+#ifndef PA_USE_ASIO
+#define PA_USE_ASIO 0
+#elif (PA_USE_ASIO != 0) && (PA_USE_ASIO != 1)
+#undef PA_USE_ASIO
+#define PA_USE_ASIO 1
+#endif
+
+#ifndef PA_USE_DS
+#define PA_USE_DS 0
+#elif (PA_USE_DS != 0) && (PA_USE_DS != 1)
+#undef PA_USE_DS
+#define PA_USE_DS 1
+#endif
+
+#ifndef PA_USE_WMME
+#define PA_USE_WMME 0
+#elif (PA_USE_WMME != 0) && (PA_USE_WMME != 1)
+#undef PA_USE_WMME
+#define PA_USE_WMME 1
+#endif
+
+#ifndef PA_USE_WASAPI
+#define PA_USE_WASAPI 0
+#elif (PA_USE_WASAPI != 0) && (PA_USE_WASAPI != 1)
+#undef PA_USE_WASAPI
+#define PA_USE_WASAPI 1
+#endif
+
+#ifndef PA_USE_WDMKS
+#define PA_USE_WDMKS 0
+#elif (PA_USE_WDMKS != 0) && (PA_USE_WDMKS != 1)
+#undef PA_USE_WDMKS
+#define PA_USE_WDMKS 1
+#endif
+
#ifdef __cplusplus
extern "C"
{
diff --git a/src/hostapi/asio/pa_asio.cpp b/src/hostapi/asio/pa_asio.cpp
index 79e778f..0215503 100644
--- a/src/hostapi/asio/pa_asio.cpp
+++ b/src/hostapi/asio/pa_asio.cpp
@@ -2380,8 +2380,8 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
reports the added latency separately.
*/
PA_DEBUG(("PaAsio : ASIO InputLatency = %ld (%ld ms),\n added buffProc:%ld (%ld ms),\n added blocking:%ld (%ld ms)\n",
- stream->inputLatency,
- (long)( stream->inputLatency * (1000.0 / sampleRate) ),
+ stream->asioInputLatencyFrames,
+ (long)( stream->asioInputLatencyFrames * (1000.0 / sampleRate) ),
PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor),
(long)( PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor) * (1000.0 / sampleRate) ),
PaUtil_GetBufferProcessorInputLatency(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer,
@@ -2471,8 +2471,8 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
reports the added latency separately.
*/
PA_DEBUG(("PaAsio : ASIO OutputLatency = %ld (%ld ms),\n added buffProc:%ld (%ld ms),\n added blocking:%ld (%ld ms)\n",
- stream->outputLatency,
- (long)( stream->inputLatency * (1000.0 / sampleRate) ),
+ stream->asioOutputLatencyFrames,
+ (long)( stream->asioOutputLatencyFrames * (1000.0 / sampleRate) ),
PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor),
(long)( PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor) * (1000.0 / sampleRate) ),
PaUtil_GetBufferProcessorOutputLatency(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer,
@@ -2527,15 +2527,15 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
// the code below prints the ASIO latency which doesn't include the
// buffer processor latency. it reports the added latency separately
PA_DEBUG(("PaAsio : ASIO InputLatency = %ld (%ld ms), added buffProc:%ld (%ld ms)\n",
- stream->inputLatency,
- (long)((stream->inputLatency*1000)/ sampleRate),
+ stream->asioInputLatencyFrames,
+ (long)((stream->asioInputLatencyFrames*1000)/ sampleRate),
PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor),
(long)((PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor)*1000)/ sampleRate)
));
PA_DEBUG(("PaAsio : ASIO OuputLatency = %ld (%ld ms), added buffProc:%ld (%ld ms)\n",
- stream->outputLatency,
- (long)((stream->outputLatency*1000)/ sampleRate),
+ stream->asioOutputLatencyFrames,
+ (long)((stream->asioOutputLatencyFrames*1000)/ sampleRate),
PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor),
(long)((PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor)*1000)/ sampleRate)
));
diff --git a/src/hostapi/dsound/pa_win_ds.c b/src/hostapi/dsound/pa_win_ds.c
index b132ce3..ca04614 100644
--- a/src/hostapi/dsound/pa_win_ds.c
+++ b/src/hostapi/dsound/pa_win_ds.c
@@ -41,7 +41,6 @@
@ingroup hostapi_src
*/
-
#include
#include
#include /* strlen() */
@@ -76,6 +75,9 @@
#include "pa_win_waveformat.h"
#include "pa_win_wdmks_utils.h"
+#ifndef PA_USE_WMME
+#error "Portaudio internal error: PA_USE_WMME=0/1 not defined. pa_hostapi.h should ensure that it is."
+#endif
#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */
#pragma comment( lib, "dsound.lib" )
@@ -678,7 +680,7 @@ static PaError AddOutputDeviceInfoFromDirectSound(
else
{
-#ifndef PA_NO_WMME
+#if PA_USE_WMME
if( caps.dwFlags & DSCAPS_EMULDRIVER )
{
/* If WMME supported, then reject Emulated drivers because they are lousy. */
@@ -894,7 +896,7 @@ static PaError AddInputDeviceInfoFromDirectSoundCapture(
}
else
{
-#ifndef PA_NO_WMME
+#if PA_USE_WMME
if( caps.dwFlags & DSCAPS_EMULDRIVER )
{
/* If WMME supported, then reject Emulated drivers because they are lousy. */
@@ -2832,5 +2834,3 @@ static signed long GetStreamWriteAvailable( PaStream* s )
return 0;
}
-
-
diff --git a/src/hostapi/wdmks/pa_win_wdmks.c b/src/hostapi/wdmks/pa_win_wdmks.c
index 93032ec..8070dbf 100644
--- a/src/hostapi/wdmks/pa_win_wdmks.c
+++ b/src/hostapi/wdmks/pa_win_wdmks.c
@@ -106,6 +106,10 @@
#define DYNAMIC_GUID(data) DYNAMIC_GUID_THUNK(data)
#endif
+#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */
+#pragma comment( lib, "setupapi.lib" )
+#endif
+
/* use CreateThread for CYGWIN, _beginthreadex for all others */
#ifndef __CYGWIN__
#define CREATE_THREAD (HANDLE)_beginthreadex( 0, 0, ProcessingThreadProc, stream, 0, &stream->processingThreadId )
diff --git a/src/os/win/pa_win_hostapis.c b/src/os/win/pa_win_hostapis.c
index 13d6c6f..7deafa1 100644
--- a/src/os/win/pa_win_hostapis.c
+++ b/src/os/win/pa_win_hostapis.c
@@ -42,7 +42,6 @@
@brief Win32 host API initialization function table.
*/
-
#include "pa_hostapi.h"
#ifdef __cplusplus
@@ -65,27 +64,25 @@ PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiInd
PaUtilHostApiInitializer *paHostApiInitializers[] =
{
-#ifndef PA_NO_WMME
+#if PA_USE_WMME
PaWinMme_Initialize,
#endif
-#ifndef PA_NO_DS
+#if PA_USE_DS
PaWinDs_Initialize,
#endif
-#ifndef PA_NO_ASIO
+#if PA_USE_ASIO
PaAsio_Initialize,
#endif
-#ifndef PA_NO_WASAPI
+#if PA_USE_WASAPI
PaWasapi_Initialize,
#endif
-/*
-#ifndef PA_NO_WDMKS
- PaWinWdm_Initialize,
+#if PA_USE_WDMKS
+ PaWinWdm_Initialize,
#endif
-*/
//PaSkeleton_Initialize, /* just for testing */
diff --git a/test/pa_devs.c b/test/pa_devs.c
index e868952..4862e6a 100644
--- a/test/pa_devs.c
+++ b/test/pa_devs.c
@@ -3,7 +3,7 @@
@brief List available devices, including device information.
@author Phil Burk http://www.softsynth.com
- @note Define PA_NO_ASIO to compile this code on Windows without
+ @note Define PA_USE_ASIO=0 to compile this code on Windows without
ASIO support.
*/
/*
@@ -49,7 +49,7 @@
#include "portaudio.h"
#ifdef WIN32
-#ifndef PA_NO_ASIO
+#if PA_USE_ASIO
#include "pa_asio.h"
#endif
#endif
@@ -167,7 +167,7 @@ int main(void)
printf( "Default high output latency = %8.3f\n", deviceInfo->defaultHighOutputLatency );
#ifdef WIN32
-#ifndef PA_NO_ASIO
+#if PA_USE_ASIO
/* ASIO specific latency information */
if( Pa_GetHostApiInfo( deviceInfo->hostApi )->type == paASIO ){
long minLatency, maxLatency, preferredLatency, granularity;
@@ -184,7 +184,7 @@ int main(void)
else
printf( "ASIO buffer granularity = %ld\n", granularity );
}
-#endif /* !PA_NO_ASIO */
+#endif /* PA_USE_ASIO */
#endif /* WIN32 */
printf( "Default sample rate = %8.2f\n", deviceInfo->defaultSampleRate );