changeset 145:13a516fa8999

Update PortAudio build for Win64
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 10 Jan 2017 11:28:20 +0000
parents a0c5ef2265f5
children 206f0eb279b8
files src/portaudio_20161030/build/msvc/portaudio.sln win64-msvc/include/pa_win_ds.h win64-msvc/include/pa_win_wasapi.h win64-msvc/include/pa_win_waveformat.h win64-msvc/include/pa_win_wdmks.h win64-msvc/include/pa_win_wmme.h win64-msvc/include/portaudio.h win64-msvc/lib/portaudio.lib
diffstat 8 files changed, 836 insertions(+), 700 deletions(-) [+]
line wrap: on
line diff
--- a/src/portaudio_20161030/build/msvc/portaudio.sln	Mon Jan 09 13:57:37 2017 +0000
+++ b/src/portaudio_20161030/build/msvc/portaudio.sln	Tue Jan 10 11:28:20 2017 +0000
@@ -1,7 +1,9 @@
 
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portaudio", "portaudio.vcproj", "{0A18A071-125E-442F-AFF7-A3F68ABECF99}"
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.25420.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portaudio", "portaudio.vcxproj", "{0A18A071-125E-442F-AFF7-A3F68ABECF99}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,8 +15,8 @@
 		ReleaseMinDependency|x64 = ReleaseMinDependency|x64
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|Win32.ActiveCfg = Debug|Win32
-		{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|Win32.Build.0 = Debug|Win32
+		{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|Win32.ActiveCfg = Release|x64
+		{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|Win32.Build.0 = Release|x64
 		{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|x64.ActiveCfg = Debug|x64
 		{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|x64.Build.0 = Debug|x64
 		{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|Win32.ActiveCfg = Release|Win32
--- a/win64-msvc/include/pa_win_ds.h	Mon Jan 09 13:57:37 2017 +0000
+++ b/win64-msvc/include/pa_win_ds.h	Tue Jan 10 11:28:20 2017 +0000
@@ -1,95 +1,95 @@
-#ifndef PA_WIN_DS_H
-#define PA_WIN_DS_H
-/*
- * $Id:  $
- * PortAudio Portable Real-Time Audio Library
- * DirectSound specific extensions
- *
- * Copyright (c) 1999-2007 Ross Bencina and Phil Burk
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files
- * (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * The text above constitutes the entire PortAudio license; however, 
- * the PortAudio community also makes the following non-binding requests:
- *
- * Any person wishing to distribute modifications to the Software is
- * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also 
- * requested that these non-binding requests be included along with the 
- * license above.
- */
-
-/** @file
- @ingroup public_header
- @brief DirectSound-specific PortAudio API extension header file.
-*/
-
-#include "portaudio.h"
-#include "pa_win_waveformat.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-
-#define paWinDirectSoundUseLowLevelLatencyParameters            (0x01)
-#define paWinDirectSoundUseChannelMask                          (0x04)
-
-
-typedef struct PaWinDirectSoundStreamInfo{
-    unsigned long size;             /**< sizeof(PaWinDirectSoundStreamInfo) */
-    PaHostApiTypeId hostApiType;    /**< paDirectSound */
-    unsigned long version;          /**< 2 */
-
-    unsigned long flags;            /**< enable other features of this struct */
-
-    /** 
-       low-level latency setting support
-       Sets the size of the DirectSound host buffer.
-       When flags contains the paWinDirectSoundUseLowLevelLatencyParameters
-       this size will be used instead of interpreting the generic latency 
-       parameters to Pa_OpenStream(). If the flag is not set this value is ignored.
-
-       If the stream is a full duplex stream the implementation requires that
-       the values of framesPerBuffer for input and output match (if both are specified).
-    */
-    unsigned long framesPerBuffer;
-
-    /**
-        support for WAVEFORMATEXTENSIBLE channel masks. If flags contains
-        paWinDirectSoundUseChannelMask this allows you to specify which speakers 
-        to address in a multichannel stream. Constants for channelMask
-        are specified in pa_win_waveformat.h
-
-    */
-    PaWinWaveFormatChannelMask channelMask;
-
-}PaWinDirectSoundStreamInfo;
-
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* PA_WIN_DS_H */                                  
+#ifndef PA_WIN_DS_H
+#define PA_WIN_DS_H
+/*
+ * $Id:  $
+ * PortAudio Portable Real-Time Audio Library
+ * DirectSound specific extensions
+ *
+ * Copyright (c) 1999-2007 Ross Bencina and Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+/** @file
+ @ingroup public_header
+ @brief DirectSound-specific PortAudio API extension header file.
+*/
+
+#include "portaudio.h"
+#include "pa_win_waveformat.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+#define paWinDirectSoundUseLowLevelLatencyParameters            (0x01)
+#define paWinDirectSoundUseChannelMask                          (0x04)
+
+
+typedef struct PaWinDirectSoundStreamInfo{
+    unsigned long size;             /**< sizeof(PaWinDirectSoundStreamInfo) */
+    PaHostApiTypeId hostApiType;    /**< paDirectSound */
+    unsigned long version;          /**< 2 */
+
+    unsigned long flags;            /**< enable other features of this struct */
+
+    /** 
+       low-level latency setting support
+       Sets the size of the DirectSound host buffer.
+       When flags contains the paWinDirectSoundUseLowLevelLatencyParameters
+       this size will be used instead of interpreting the generic latency 
+       parameters to Pa_OpenStream(). If the flag is not set this value is ignored.
+
+       If the stream is a full duplex stream the implementation requires that
+       the values of framesPerBuffer for input and output match (if both are specified).
+    */
+    unsigned long framesPerBuffer;
+
+    /**
+        support for WAVEFORMATEXTENSIBLE channel masks. If flags contains
+        paWinDirectSoundUseChannelMask this allows you to specify which speakers 
+        to address in a multichannel stream. Constants for channelMask
+        are specified in pa_win_waveformat.h
+
+    */
+    PaWinWaveFormatChannelMask channelMask;
+
+}PaWinDirectSoundStreamInfo;
+
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* PA_WIN_DS_H */                                  
--- a/win64-msvc/include/pa_win_wasapi.h	Mon Jan 09 13:57:37 2017 +0000
+++ b/win64-msvc/include/pa_win_wasapi.h	Tue Jan 10 11:28:20 2017 +0000
@@ -1,391 +1,443 @@
-#ifndef PA_WIN_WASAPI_H
-#define PA_WIN_WASAPI_H
-/*
- * $Id:  $
- * PortAudio Portable Real-Time Audio Library
- * DirectSound specific extensions
- *
- * Copyright (c) 1999-2007 Ross Bencina and Phil Burk
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files
- * (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * The text above constitutes the entire PortAudio license; however, 
- * the PortAudio community also makes the following non-binding requests:
- *
- * Any person wishing to distribute modifications to the Software is
- * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also 
- * requested that these non-binding requests be included along with the 
- * license above.
- */
-
-/** @file
- @ingroup public_header
- @brief WASAPI-specific PortAudio API extension header file.
-*/
-
-#include "portaudio.h"
-#include "pa_win_waveformat.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-
-/* Setup flags */
-typedef enum PaWasapiFlags
-{
-    /* puts WASAPI into exclusive mode */
-    paWinWasapiExclusive                = (1 << 0),
-
-    /* allows to skip internal PA processing completely */
-    paWinWasapiRedirectHostProcessor    = (1 << 1),
-
-    /* assigns custom channel mask */
-    paWinWasapiUseChannelMask           = (1 << 2),
-
-    /* selects non-Event driven method of data read/write
-       Note: WASAPI Event driven core is capable of 2ms latency!!!, but Polling
-             method can only provide 15-20ms latency. */
-    paWinWasapiPolling                  = (1 << 3),
-
-    /* forces custom thread priority setting. must be used if PaWasapiStreamInfo::threadPriority 
-       is set to custom value. */
-    paWinWasapiThreadPriority           = (1 << 4)
-}
-PaWasapiFlags;
-#define paWinWasapiExclusive             (paWinWasapiExclusive)
-#define paWinWasapiRedirectHostProcessor (paWinWasapiRedirectHostProcessor)
-#define paWinWasapiUseChannelMask        (paWinWasapiUseChannelMask)
-#define paWinWasapiPolling               (paWinWasapiPolling)
-#define paWinWasapiThreadPriority        (paWinWasapiThreadPriority)
-
-
-/* Host processor. Allows to skip internal PA processing completely. 
-   You must set paWinWasapiRedirectHostProcessor flag to PaWasapiStreamInfo::flags member
-   in order to have host processor redirected to your callback.
-   Use with caution! inputFrames and outputFrames depend solely on final device setup.
-   To query maximal values of inputFrames/outputFrames use PaWasapi_GetFramesPerHostBuffer.
-*/
-typedef void (*PaWasapiHostProcessorCallback) (void *inputBuffer,  long inputFrames,
-                                               void *outputBuffer, long outputFrames,
-                                               void *userData);
-
-/* Device role */
-typedef enum PaWasapiDeviceRole
-{
-    eRoleRemoteNetworkDevice = 0,
-    eRoleSpeakers,
-    eRoleLineLevel,
-    eRoleHeadphones,
-    eRoleMicrophone,
-    eRoleHeadset,
-    eRoleHandset,
-    eRoleUnknownDigitalPassthrough,
-    eRoleSPDIF,
-    eRoleHDMI,
-    eRoleUnknownFormFactor
-}
-PaWasapiDeviceRole;
-
-
-/* Jack connection type */
-typedef enum PaWasapiJackConnectionType
-{
-    eJackConnTypeUnknown,
-    eJackConnType3Point5mm,
-    eJackConnTypeQuarter,
-    eJackConnTypeAtapiInternal,
-    eJackConnTypeRCA,
-    eJackConnTypeOptical,
-    eJackConnTypeOtherDigital,
-    eJackConnTypeOtherAnalog,
-    eJackConnTypeMultichannelAnalogDIN,
-    eJackConnTypeXlrProfessional,
-    eJackConnTypeRJ11Modem,
-    eJackConnTypeCombination
-} 
-PaWasapiJackConnectionType;
-
-
-/* Jack geometric location */
-typedef enum PaWasapiJackGeoLocation
-{
-	eJackGeoLocUnk = 0,
-    eJackGeoLocRear = 0x1, /* matches EPcxGeoLocation::eGeoLocRear */
-    eJackGeoLocFront,
-    eJackGeoLocLeft,
-    eJackGeoLocRight,
-    eJackGeoLocTop,
-    eJackGeoLocBottom,
-    eJackGeoLocRearPanel,
-    eJackGeoLocRiser,
-    eJackGeoLocInsideMobileLid,
-    eJackGeoLocDrivebay,
-    eJackGeoLocHDMI,
-    eJackGeoLocOutsideMobileLid,
-    eJackGeoLocATAPI,
-    eJackGeoLocReserved5,
-    eJackGeoLocReserved6,
-} 
-PaWasapiJackGeoLocation;
-
-
-/* Jack general location */
-typedef enum PaWasapiJackGenLocation
-{
-    eJackGenLocPrimaryBox = 0,
-    eJackGenLocInternal,
-    eJackGenLocSeparate,
-    eJackGenLocOther
-} 
-PaWasapiJackGenLocation;
-
-
-/* Jack's type of port */
-typedef enum PaWasapiJackPortConnection
-{
-    eJackPortConnJack = 0,
-    eJackPortConnIntegratedDevice,
-    eJackPortConnBothIntegratedAndJack,
-    eJackPortConnUnknown
-} 
-PaWasapiJackPortConnection;
-
-
-/* Thread priority */
-typedef enum PaWasapiThreadPriority
-{
-    eThreadPriorityNone = 0,
-    eThreadPriorityAudio,            //!< Default for Shared mode.
-    eThreadPriorityCapture,
-    eThreadPriorityDistribution,
-    eThreadPriorityGames,
-    eThreadPriorityPlayback,
-    eThreadPriorityProAudio,        //!< Default for Exclusive mode.
-    eThreadPriorityWindowManager
-}
-PaWasapiThreadPriority;
-
-
-/* Stream descriptor. */
-typedef struct PaWasapiJackDescription 
-{
-    unsigned long              channelMapping;
-    unsigned long              color; /* derived from macro: #define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16))) */
-    PaWasapiJackConnectionType connectionType;
-    PaWasapiJackGeoLocation    geoLocation;
-    PaWasapiJackGenLocation    genLocation;
-    PaWasapiJackPortConnection portConnection;
-    unsigned int               isConnected;
-}
-PaWasapiJackDescription;
-
-
-/* Stream descriptor. */
-typedef struct PaWasapiStreamInfo 
-{
-    unsigned long size;             /**< sizeof(PaWasapiStreamInfo) */
-    PaHostApiTypeId hostApiType;    /**< paWASAPI */
-    unsigned long version;          /**< 1 */
-
-    unsigned long flags;            /**< collection of PaWasapiFlags */
-
-    /* Support for WAVEFORMATEXTENSIBLE channel masks. If flags contains
-       paWinWasapiUseChannelMask this allows you to specify which speakers 
-       to address in a multichannel stream. Constants for channelMask
-       are specified in pa_win_waveformat.h. Will be used only if 
-       paWinWasapiUseChannelMask flag is specified.
-    */
-    PaWinWaveFormatChannelMask channelMask;
-
-    /* Delivers raw data to callback obtained from GetBuffer() methods skipping 
-       internal PortAudio processing inventory completely. userData parameter will 
-       be the same that was passed to Pa_OpenStream method. Will be used only if 
-       paWinWasapiRedirectHostProcessor flag is specified.
-    */
-    PaWasapiHostProcessorCallback hostProcessorOutput;
-    PaWasapiHostProcessorCallback hostProcessorInput;
-
-    /* Specifies thread priority explicitly. Will be used only if paWinWasapiThreadPriority flag
-       is specified.
-
-       Please note, if Input/Output streams are opened simultaniously (Full-Duplex mode)
-       you shall specify same value for threadPriority or othervise one of the values will be used
-       to setup thread priority.
-    */
-    PaWasapiThreadPriority threadPriority;
-} 
-PaWasapiStreamInfo;
-
-
-/** Returns default sound format for device. Format is represented by PaWinWaveFormat or 
-    WAVEFORMATEXTENSIBLE structure.
-
- @param pFormat Pointer to PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure.
- @param nFormatSize Size of PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure in bytes.
- @param nDevice Device index.
-
- @return Non-negative value indicating the number of bytes copied into format decriptor
-         or, a PaErrorCode (which are always negative) if PortAudio is not initialized
-         or an error is encountered.
-*/
-int PaWasapi_GetDeviceDefaultFormat( void *pFormat, unsigned int nFormatSize, PaDeviceIndex nDevice );
-
-
-/** Returns device role (PaWasapiDeviceRole enum).
-
- @param nDevice device index.
-
- @return Non-negative value indicating device role or, a PaErrorCode (which are always negative)
-         if PortAudio is not initialized or an error is encountered.
-*/
-int/*PaWasapiDeviceRole*/ PaWasapi_GetDeviceRole( PaDeviceIndex nDevice );
-
-
-/** Boost thread priority of calling thread (MMCSS). Use it for Blocking Interface only for thread
-    which makes calls to Pa_WriteStream/Pa_ReadStream.
-
- @param hTask Handle to pointer to priority task. Must be used with PaWasapi_RevertThreadPriority
-              method to revert thread priority to initial state.
-
- @param nPriorityClass Id of thread priority of PaWasapiThreadPriority type. Specifying 
-                       eThreadPriorityNone does nothing.
-
- @return Error code indicating success or failure.
- @see    PaWasapi_RevertThreadPriority
-*/
-PaError PaWasapi_ThreadPriorityBoost( void **hTask, PaWasapiThreadPriority nPriorityClass );
-
-
-/** Boost thread priority of calling thread (MMCSS). Use it for Blocking Interface only for thread
-    which makes calls to Pa_WriteStream/Pa_ReadStream.
-
- @param  hTask Task handle obtained by PaWasapi_BoostThreadPriority method.
- @return Error code indicating success or failure.
- @see    PaWasapi_BoostThreadPriority
-*/
-PaError PaWasapi_ThreadPriorityRevert( void *hTask );
-
-
-/** Get number of frames per host buffer. This is maximal value of frames of WASAPI buffer which 
-    can be locked for operations. Use this method as helper to findout maximal values of 
-    inputFrames/outputFrames of PaWasapiHostProcessorCallback.
-
- @param  pStream Pointer to PaStream to query.
- @param  nInput  Pointer to variable to receive number of input frames. Can be NULL.
- @param  nOutput Pointer to variable to receive number of output frames. Can be NULL.
- @return Error code indicating success or failure.
- @see    PaWasapiHostProcessorCallback
-*/
-PaError PaWasapi_GetFramesPerHostBuffer( PaStream *pStream, unsigned int *nInput, unsigned int *nOutput );
-
-
-/** Get number of jacks associated with a WASAPI device.  Use this method to determine if
-    there are any jacks associated with the provided WASAPI device.  Not all audio devices
-	will support this capability.  This is valid for both input and output devices.
- @param  nDevice  device index.
- @param  jcount   Number of jacks is returned in this variable
- @return Error code indicating success or failure
- @see PaWasapi_GetJackDescription
- */
-PaError PaWasapi_GetJackCount(PaDeviceIndex nDevice, int *jcount);
-
-
-/** Get the jack description associated with a WASAPI device and jack number
-    Before this function is called, use PaWasapi_GetJackCount to determine the
-	number of jacks associated with device.  If jcount is greater than zero, then
-	each jack from 0 to jcount can be queried with this function to get the jack
-	description.
- @param  nDevice  device index.
- @param  jindex   Which jack to return information
- @param  KSJACK_DESCRIPTION This structure filled in on success.
- @return Error code indicating success or failure
- @see PaWasapi_GetJackCount
- */
-PaError PaWasapi_GetJackDescription(PaDeviceIndex nDevice, int jindex, PaWasapiJackDescription *pJackDescription);
-
-
-/*
-    IMPORTANT:
-
-    WASAPI is implemented for Callback and Blocking interfaces. It supports Shared and Exclusive
-    share modes. 
-    
-    Exclusive Mode:
-
-        Exclusive mode allows to deliver audio data directly to hardware bypassing
-        software mixing.
-        Exclusive mode is specified by 'paWinWasapiExclusive' flag.
-
-    Callback Interface:
-
-        Provides best audio quality with low latency. Callback interface is implemented in 
-        two versions:
-
-        1) Event-Driven:
-        This is the most powerful WASAPI implementation which provides glitch-free
-        audio at around 3ms latency in Exclusive mode. Lowest possible latency for this mode is 
-        3 ms for HD Audio class audio chips. For the Shared mode latency can not be 
-		lower than 20 ms.
-
-        2) Poll-Driven:
-        Polling is another 2-nd method to operate with WASAPI. It is less efficient than Event-Driven
-        and provides latency at around 10-13ms. Polling must be used to overcome a system bug
-        under Windows Vista x64 when application is WOW64(32-bit) and Event-Driven method simply 
-        times out (event handle is never signalled on buffer completion). Please note, such WOW64 bug 
-        does not exist in Vista x86 or Windows 7.
-        Polling can be setup by speciying 'paWinWasapiPolling' flag. Our WASAPI implementation detects
-        WOW64 bug and sets 'paWinWasapiPolling' automatically.
-
-    Thread priority:
-
-        Normally thread priority is set automatically and does not require modification. Although
-        if user wants some tweaking thread priority can be modified by setting 'paWinWasapiThreadPriority'
-        flag and specifying 'PaWasapiStreamInfo::threadPriority' with value from PaWasapiThreadPriority 
-        enum.
-
-    Blocking Interface:
-
-        Blocking interface is implemented but due to above described Poll-Driven method can not
-        deliver lowest possible latency. Specifying too low latency in Shared mode will result in 
-        distorted audio although Exclusive mode adds stability.
-
-    Pa_IsFormatSupported:
-
-        To check format with correct Share Mode (Exclusive/Shared) you must supply
-        PaWasapiStreamInfo with flags paWinWasapiExclusive set through member of 
-        PaStreamParameters::hostApiSpecificStreamInfo structure.
-
-    Pa_OpenStream:
-
-        To set desired Share Mode (Exclusive/Shared) you must supply
-        PaWasapiStreamInfo with flags paWinWasapiExclusive set through member of 
-        PaStreamParameters::hostApiSpecificStreamInfo structure.
-*/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* PA_WIN_WASAPI_H */                                  
+#ifndef PA_WIN_WASAPI_H
+#define PA_WIN_WASAPI_H
+/*
+ * $Id:  $
+ * PortAudio Portable Real-Time Audio Library
+ * DirectSound specific extensions
+ *
+ * Copyright (c) 1999-2007 Ross Bencina and Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+/** @file
+ @ingroup public_header
+ @brief WASAPI-specific PortAudio API extension header file.
+*/
+
+#include "portaudio.h"
+#include "pa_win_waveformat.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+/* Setup flags */
+typedef enum PaWasapiFlags
+{
+    /* puts WASAPI into exclusive mode */
+    paWinWasapiExclusive                = (1 << 0),
+
+    /* allows to skip internal PA processing completely */
+    paWinWasapiRedirectHostProcessor    = (1 << 1),
+
+    /* assigns custom channel mask */
+    paWinWasapiUseChannelMask           = (1 << 2),
+
+    /* selects non-Event driven method of data read/write
+       Note: WASAPI Event driven core is capable of 2ms latency!!!, but Polling
+             method can only provide 15-20ms latency. */
+    paWinWasapiPolling                  = (1 << 3),
+
+    /* forces custom thread priority setting, must be used if PaWasapiStreamInfo::threadPriority 
+       is set to a custom value */
+    paWinWasapiThreadPriority           = (1 << 4)
+}
+PaWasapiFlags;
+#define paWinWasapiExclusive             (paWinWasapiExclusive)
+#define paWinWasapiRedirectHostProcessor (paWinWasapiRedirectHostProcessor)
+#define paWinWasapiUseChannelMask        (paWinWasapiUseChannelMask)
+#define paWinWasapiPolling               (paWinWasapiPolling)
+#define paWinWasapiThreadPriority        (paWinWasapiThreadPriority)
+
+
+/* Host processor. Allows to skip internal PA processing completely. 
+   You must set paWinWasapiRedirectHostProcessor flag to PaWasapiStreamInfo::flags member
+   in order to have host processor redirected to your callback.
+   Use with caution! inputFrames and outputFrames depend solely on final device setup.
+   To query maximal values of inputFrames/outputFrames use PaWasapi_GetFramesPerHostBuffer.
+*/
+typedef void (*PaWasapiHostProcessorCallback) (void *inputBuffer,  long inputFrames,
+                                               void *outputBuffer, long outputFrames,
+                                               void *userData);
+
+/* Device role. */
+typedef enum PaWasapiDeviceRole
+{
+    eRoleRemoteNetworkDevice = 0,
+    eRoleSpeakers,
+    eRoleLineLevel,
+    eRoleHeadphones,
+    eRoleMicrophone,
+    eRoleHeadset,
+    eRoleHandset,
+    eRoleUnknownDigitalPassthrough,
+    eRoleSPDIF,
+    eRoleHDMI,
+    eRoleUnknownFormFactor
+}
+PaWasapiDeviceRole;
+
+
+/* Jack connection type. */
+typedef enum PaWasapiJackConnectionType
+{
+    eJackConnTypeUnknown,
+    eJackConnType3Point5mm,
+    eJackConnTypeQuarter,
+    eJackConnTypeAtapiInternal,
+    eJackConnTypeRCA,
+    eJackConnTypeOptical,
+    eJackConnTypeOtherDigital,
+    eJackConnTypeOtherAnalog,
+    eJackConnTypeMultichannelAnalogDIN,
+    eJackConnTypeXlrProfessional,
+    eJackConnTypeRJ11Modem,
+    eJackConnTypeCombination
+} 
+PaWasapiJackConnectionType;
+
+
+/* Jack geometric location. */
+typedef enum PaWasapiJackGeoLocation
+{
+    eJackGeoLocUnk = 0,
+    eJackGeoLocRear = 0x1, /* matches EPcxGeoLocation::eGeoLocRear */
+    eJackGeoLocFront,
+    eJackGeoLocLeft,
+    eJackGeoLocRight,
+    eJackGeoLocTop,
+    eJackGeoLocBottom,
+    eJackGeoLocRearPanel,
+    eJackGeoLocRiser,
+    eJackGeoLocInsideMobileLid,
+    eJackGeoLocDrivebay,
+    eJackGeoLocHDMI,
+    eJackGeoLocOutsideMobileLid,
+    eJackGeoLocATAPI,
+    eJackGeoLocReserved5,
+    eJackGeoLocReserved6,
+} 
+PaWasapiJackGeoLocation;
+
+
+/* Jack general location. */
+typedef enum PaWasapiJackGenLocation
+{
+    eJackGenLocPrimaryBox = 0,
+    eJackGenLocInternal,
+    eJackGenLocSeparate,
+    eJackGenLocOther
+} 
+PaWasapiJackGenLocation;
+
+
+/* Jack's type of port. */
+typedef enum PaWasapiJackPortConnection
+{
+    eJackPortConnJack = 0,
+    eJackPortConnIntegratedDevice,
+    eJackPortConnBothIntegratedAndJack,
+    eJackPortConnUnknown
+} 
+PaWasapiJackPortConnection;
+
+
+/* Thread priority. */
+typedef enum PaWasapiThreadPriority
+{
+    eThreadPriorityNone = 0,
+    eThreadPriorityAudio,            //!< Default for Shared mode.
+    eThreadPriorityCapture,
+    eThreadPriorityDistribution,
+    eThreadPriorityGames,
+    eThreadPriorityPlayback,
+    eThreadPriorityProAudio,        //!< Default for Exclusive mode.
+    eThreadPriorityWindowManager
+}
+PaWasapiThreadPriority;
+
+
+/* Stream descriptor. */
+typedef struct PaWasapiJackDescription 
+{
+    unsigned long              channelMapping;
+    unsigned long              color; /* derived from macro: #define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16))) */
+    PaWasapiJackConnectionType connectionType;
+    PaWasapiJackGeoLocation    geoLocation;
+    PaWasapiJackGenLocation    genLocation;
+    PaWasapiJackPortConnection portConnection;
+    unsigned int               isConnected;
+}
+PaWasapiJackDescription;
+
+
+/** Stream category.
+   Note:
+    - values are equal to WASAPI AUDIO_STREAM_CATEGORY enum
+    - supported since Windows 8.0, noop on earler versions
+    - values 1,2 are deprecated on Windows 10 and not included into enumeration
+
+ @version Available as of 19.6.0
+*/
+typedef enum PaWasapiStreamCategory
+{
+    eAudioCategoryOther           = 0,
+    eAudioCategoryCommunications  = 3,
+    eAudioCategoryAlerts          = 4,
+    eAudioCategorySoundEffects    = 5,
+    eAudioCategoryGameEffects     = 6,
+    eAudioCategoryGameMedia       = 7,
+    eAudioCategoryGameChat        = 8,
+    eAudioCategorySpeech          = 9,
+    eAudioCategoryMovie           = 10,
+    eAudioCategoryMedia           = 11
+}
+PaWasapiStreamCategory;
+
+
+/** Stream option.
+   Note:
+    - values are equal to WASAPI AUDCLNT_STREAMOPTIONS enum
+    - supported since Windows 8.1, noop on earler versions
+
+ @version Available as of 19.6.0
+*/
+typedef enum PaWasapiStreamOption
+{
+    eStreamOptionNone        = 0, //!< default
+    eStreamOptionRaw         = 1, //!< bypass WASAPI Audio Engine DSP effects, supported since Windows 8.1
+    eStreamOptionMatchFormat = 2  //!< force WASAPI Audio Engine into a stream format, supported since Windows 10
+}
+PaWasapiStreamOption;
+
+
+/* Stream descriptor. */
+typedef struct PaWasapiStreamInfo 
+{
+    unsigned long size;             /**< sizeof(PaWasapiStreamInfo) */
+    PaHostApiTypeId hostApiType;    /**< paWASAPI */
+    unsigned long version;          /**< 1 */
+
+    unsigned long flags;            /**< collection of PaWasapiFlags */
+
+    /** Support for WAVEFORMATEXTENSIBLE channel masks. If flags contains
+       paWinWasapiUseChannelMask this allows you to specify which speakers 
+       to address in a multichannel stream. Constants for channelMask
+       are specified in pa_win_waveformat.h. Will be used only if 
+       paWinWasapiUseChannelMask flag is specified.
+    */
+    PaWinWaveFormatChannelMask channelMask;
+
+    /** Delivers raw data to callback obtained from GetBuffer() methods skipping
+       internal PortAudio processing inventory completely. userData parameter will 
+       be the same that was passed to Pa_OpenStream method. Will be used only if 
+       paWinWasapiRedirectHostProcessor flag is specified.
+    */
+    PaWasapiHostProcessorCallback hostProcessorOutput;
+    PaWasapiHostProcessorCallback hostProcessorInput;
+
+    /** Specifies thread priority explicitly. Will be used only if paWinWasapiThreadPriority flag
+       is specified.
+
+       Please note, if Input/Output streams are opened simultaniously (Full-Duplex mode)
+       you shall specify same value for threadPriority or othervise one of the values will be used
+       to setup thread priority.
+    */
+    PaWasapiThreadPriority threadPriority;
+
+    /** Stream category.
+     @see PaWasapiStreamCategory
+     @version Available as of 19.6.0
+    */
+    PaWasapiStreamCategory streamCategory;
+
+    /** Stream option.
+     @see PaWasapiStreamOption
+     @version Available as of 19.6.0
+    */
+    PaWasapiStreamOption streamOption;
+} 
+PaWasapiStreamInfo;
+
+
+/** Returns default sound format for device. Format is represented by PaWinWaveFormat or 
+    WAVEFORMATEXTENSIBLE structure.
+
+ @param pFormat Pointer to PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure.
+ @param nFormatSize Size of PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure in bytes.
+ @param nDevice Device index.
+
+ @return Non-negative value indicating the number of bytes copied into format decriptor
+         or, a PaErrorCode (which are always negative) if PortAudio is not initialized
+         or an error is encountered.
+*/
+int PaWasapi_GetDeviceDefaultFormat( void *pFormat, unsigned int nFormatSize, PaDeviceIndex nDevice );
+
+
+/** Returns device role (PaWasapiDeviceRole enum).
+
+ @param nDevice device index.
+
+ @return Non-negative value indicating device role or, a PaErrorCode (which are always negative)
+         if PortAudio is not initialized or an error is encountered.
+*/
+int/*PaWasapiDeviceRole*/ PaWasapi_GetDeviceRole( PaDeviceIndex nDevice );
+
+
+/** Boost thread priority of calling thread (MMCSS). Use it for Blocking Interface only for thread
+    which makes calls to Pa_WriteStream/Pa_ReadStream.
+
+ @param hTask Handle to pointer to priority task. Must be used with PaWasapi_RevertThreadPriority
+              method to revert thread priority to initial state.
+
+ @param nPriorityClass Id of thread priority of PaWasapiThreadPriority type. Specifying 
+                       eThreadPriorityNone does nothing.
+
+ @return Error code indicating success or failure.
+ @see    PaWasapi_RevertThreadPriority
+*/
+PaError PaWasapi_ThreadPriorityBoost( void **hTask, PaWasapiThreadPriority nPriorityClass );
+
+
+/** Boost thread priority of calling thread (MMCSS). Use it for Blocking Interface only for thread
+    which makes calls to Pa_WriteStream/Pa_ReadStream.
+
+ @param  hTask Task handle obtained by PaWasapi_BoostThreadPriority method.
+ @return Error code indicating success or failure.
+ @see    PaWasapi_BoostThreadPriority
+*/
+PaError PaWasapi_ThreadPriorityRevert( void *hTask );
+
+
+/** Get number of frames per host buffer. This is maximal value of frames of WASAPI buffer which 
+    can be locked for operations. Use this method as helper to findout maximal values of 
+    inputFrames/outputFrames of PaWasapiHostProcessorCallback.
+
+ @param  pStream Pointer to PaStream to query.
+ @param  nInput  Pointer to variable to receive number of input frames. Can be NULL.
+ @param  nOutput Pointer to variable to receive number of output frames. Can be NULL.
+ @return Error code indicating success or failure.
+ @see    PaWasapiHostProcessorCallback
+*/
+PaError PaWasapi_GetFramesPerHostBuffer( PaStream *pStream, unsigned int *nInput, unsigned int *nOutput );
+
+
+/** Get number of jacks associated with a WASAPI device.  Use this method to determine if
+    there are any jacks associated with the provided WASAPI device.  Not all audio devices
+    will support this capability.  This is valid for both input and output devices.
+ @param  nDevice  device index.
+ @param  jcount   Number of jacks is returned in this variable
+ @return Error code indicating success or failure
+ @see PaWasapi_GetJackDescription
+ */
+PaError PaWasapi_GetJackCount(PaDeviceIndex nDevice, int *jcount);
+
+
+/** Get the jack description associated with a WASAPI device and jack number
+    Before this function is called, use PaWasapi_GetJackCount to determine the
+    number of jacks associated with device.  If jcount is greater than zero, then
+    each jack from 0 to jcount can be queried with this function to get the jack
+    description.
+ @param  nDevice  device index.
+ @param  jindex   Which jack to return information
+ @param  KSJACK_DESCRIPTION This structure filled in on success.
+ @return Error code indicating success or failure
+ @see PaWasapi_GetJackCount
+ */
+PaError PaWasapi_GetJackDescription(PaDeviceIndex nDevice, int jindex, PaWasapiJackDescription *pJackDescription);
+
+
+/*
+    IMPORTANT:
+
+    WASAPI is implemented for Callback and Blocking interfaces. It supports Shared and Exclusive
+    share modes. 
+    
+    Exclusive Mode:
+
+        Exclusive mode allows to deliver audio data directly to hardware bypassing
+        software mixing.
+        Exclusive mode is specified by 'paWinWasapiExclusive' flag.
+
+    Callback Interface:
+
+        Provides best audio quality with low latency. Callback interface is implemented in 
+        two versions:
+
+        1) Event-Driven:
+        This is the most powerful WASAPI implementation which provides glitch-free
+        audio at around 3ms latency in Exclusive mode. Lowest possible latency for this mode is 
+        3 ms for HD Audio class audio chips. For the Shared mode latency can not be 
+        lower than 20 ms.
+
+        2) Poll-Driven:
+        Polling is another 2-nd method to operate with WASAPI. It is less efficient than Event-Driven
+        and provides latency at around 10-13ms. Polling must be used to overcome a system bug
+        under Windows Vista x64 when application is WOW64(32-bit) and Event-Driven method simply 
+        times out (event handle is never signalled on buffer completion). Please note, such WOW64 bug 
+        does not exist in Vista x86 or Windows 7.
+        Polling can be setup by speciying 'paWinWasapiPolling' flag. Our WASAPI implementation detects
+        WOW64 bug and sets 'paWinWasapiPolling' automatically.
+
+    Thread priority:
+
+        Normally thread priority is set automatically and does not require modification. Although
+        if user wants some tweaking thread priority can be modified by setting 'paWinWasapiThreadPriority'
+        flag and specifying 'PaWasapiStreamInfo::threadPriority' with value from PaWasapiThreadPriority 
+        enum.
+
+    Blocking Interface:
+
+        Blocking interface is implemented but due to above described Poll-Driven method can not
+        deliver lowest possible latency. Specifying too low latency in Shared mode will result in 
+        distorted audio although Exclusive mode adds stability.
+
+    Pa_IsFormatSupported:
+
+        To check format with correct Share Mode (Exclusive/Shared) you must supply
+        PaWasapiStreamInfo with flags paWinWasapiExclusive set through member of 
+        PaStreamParameters::hostApiSpecificStreamInfo structure.
+
+    Pa_OpenStream:
+
+        To set desired Share Mode (Exclusive/Shared) you must supply
+        PaWasapiStreamInfo with flags paWinWasapiExclusive set through member of 
+        PaStreamParameters::hostApiSpecificStreamInfo structure.
+*/
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* PA_WIN_WASAPI_H */                                  
--- a/win64-msvc/include/pa_win_waveformat.h	Mon Jan 09 13:57:37 2017 +0000
+++ b/win64-msvc/include/pa_win_waveformat.h	Tue Jan 10 11:28:20 2017 +0000
@@ -1,199 +1,199 @@
-#ifndef PA_WIN_WAVEFORMAT_H
-#define PA_WIN_WAVEFORMAT_H
-
-/*
- * PortAudio Portable Real-Time Audio Library
- * Windows WAVEFORMAT* data structure utilities
- * portaudio.h should be included before this file.
- *
- * Copyright (c) 2007 Ross Bencina
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files
- * (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * The text above constitutes the entire PortAudio license; however, 
- * the PortAudio community also makes the following non-binding requests:
- *
- * Any person wishing to distribute modifications to the Software is
- * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also 
- * requested that these non-binding requests be included along with the 
- * license above.
- */
-
-/** @file
- @ingroup public_header
- @brief Windows specific PortAudio API extension and utilities header file.
-*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-	The following #defines for speaker channel masks are the same
-	as those in ksmedia.h, except with PAWIN_ prepended, KSAUDIO_ removed
-	in some cases, and casts to PaWinWaveFormatChannelMask added.
-*/
-
-typedef unsigned long PaWinWaveFormatChannelMask;
-
-/* Speaker Positions: */
-#define PAWIN_SPEAKER_FRONT_LEFT				((PaWinWaveFormatChannelMask)0x1)
-#define PAWIN_SPEAKER_FRONT_RIGHT				((PaWinWaveFormatChannelMask)0x2)
-#define PAWIN_SPEAKER_FRONT_CENTER				((PaWinWaveFormatChannelMask)0x4)
-#define PAWIN_SPEAKER_LOW_FREQUENCY				((PaWinWaveFormatChannelMask)0x8)
-#define PAWIN_SPEAKER_BACK_LEFT					((PaWinWaveFormatChannelMask)0x10)
-#define PAWIN_SPEAKER_BACK_RIGHT				((PaWinWaveFormatChannelMask)0x20)
-#define PAWIN_SPEAKER_FRONT_LEFT_OF_CENTER		((PaWinWaveFormatChannelMask)0x40)
-#define PAWIN_SPEAKER_FRONT_RIGHT_OF_CENTER		((PaWinWaveFormatChannelMask)0x80)
-#define PAWIN_SPEAKER_BACK_CENTER				((PaWinWaveFormatChannelMask)0x100)
-#define PAWIN_SPEAKER_SIDE_LEFT					((PaWinWaveFormatChannelMask)0x200)
-#define PAWIN_SPEAKER_SIDE_RIGHT				((PaWinWaveFormatChannelMask)0x400)
-#define PAWIN_SPEAKER_TOP_CENTER				((PaWinWaveFormatChannelMask)0x800)
-#define PAWIN_SPEAKER_TOP_FRONT_LEFT			((PaWinWaveFormatChannelMask)0x1000)
-#define PAWIN_SPEAKER_TOP_FRONT_CENTER			((PaWinWaveFormatChannelMask)0x2000)
-#define PAWIN_SPEAKER_TOP_FRONT_RIGHT			((PaWinWaveFormatChannelMask)0x4000)
-#define PAWIN_SPEAKER_TOP_BACK_LEFT				((PaWinWaveFormatChannelMask)0x8000)
-#define PAWIN_SPEAKER_TOP_BACK_CENTER			((PaWinWaveFormatChannelMask)0x10000)
-#define PAWIN_SPEAKER_TOP_BACK_RIGHT			((PaWinWaveFormatChannelMask)0x20000)
-
-/* Bit mask locations reserved for future use */
-#define PAWIN_SPEAKER_RESERVED					((PaWinWaveFormatChannelMask)0x7FFC0000)
-
-/* Used to specify that any possible permutation of speaker configurations */
-#define PAWIN_SPEAKER_ALL						((PaWinWaveFormatChannelMask)0x80000000)
-
-/* DirectSound Speaker Config */
-#define PAWIN_SPEAKER_DIRECTOUT					0
-#define PAWIN_SPEAKER_MONO						(PAWIN_SPEAKER_FRONT_CENTER)
-#define PAWIN_SPEAKER_STEREO					(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT)
-#define PAWIN_SPEAKER_QUAD						(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
-												PAWIN_SPEAKER_BACK_LEFT  | PAWIN_SPEAKER_BACK_RIGHT)
-#define PAWIN_SPEAKER_SURROUND					(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
-												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_BACK_CENTER)
-#define PAWIN_SPEAKER_5POINT1					(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
-												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
-												PAWIN_SPEAKER_BACK_LEFT  | PAWIN_SPEAKER_BACK_RIGHT)
-#define PAWIN_SPEAKER_7POINT1					(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
-												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
-												PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT | \
-												PAWIN_SPEAKER_FRONT_LEFT_OF_CENTER | PAWIN_SPEAKER_FRONT_RIGHT_OF_CENTER)
-#define PAWIN_SPEAKER_5POINT1_SURROUND			(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
-												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
-												PAWIN_SPEAKER_SIDE_LEFT  | PAWIN_SPEAKER_SIDE_RIGHT)
-#define PAWIN_SPEAKER_7POINT1_SURROUND			(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
-												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
-												PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT | \
-												PAWIN_SPEAKER_SIDE_LEFT | PAWIN_SPEAKER_SIDE_RIGHT)
-/*
- According to the Microsoft documentation:
- The following are obsolete 5.1 and 7.1 settings (they lack side speakers).  Note this means
- that the default 5.1 and 7.1 settings (KSAUDIO_SPEAKER_5POINT1 and KSAUDIO_SPEAKER_7POINT1 are
- similarly obsolete but are unchanged for compatibility reasons).
-*/
-#define PAWIN_SPEAKER_5POINT1_BACK				PAWIN_SPEAKER_5POINT1
-#define PAWIN_SPEAKER_7POINT1_WIDE				PAWIN_SPEAKER_7POINT1
-
-/* DVD Speaker Positions */
-#define PAWIN_SPEAKER_GROUND_FRONT_LEFT			PAWIN_SPEAKER_FRONT_LEFT
-#define PAWIN_SPEAKER_GROUND_FRONT_CENTER		PAWIN_SPEAKER_FRONT_CENTER
-#define PAWIN_SPEAKER_GROUND_FRONT_RIGHT		PAWIN_SPEAKER_FRONT_RIGHT
-#define PAWIN_SPEAKER_GROUND_REAR_LEFT			PAWIN_SPEAKER_BACK_LEFT
-#define PAWIN_SPEAKER_GROUND_REAR_RIGHT			PAWIN_SPEAKER_BACK_RIGHT
-#define PAWIN_SPEAKER_TOP_MIDDLE				PAWIN_SPEAKER_TOP_CENTER
-#define PAWIN_SPEAKER_SUPER_WOOFER				PAWIN_SPEAKER_LOW_FREQUENCY
-
-
-/*
-	PaWinWaveFormat is defined here to provide compatibility with
-	compilation environments which don't have headers defining 
-	WAVEFORMATEXTENSIBLE (e.g. older versions of MSVC, Borland C++ etc.
-
-	The fields for WAVEFORMATEX and WAVEFORMATEXTENSIBLE are declared as an
-    unsigned char array here to avoid clients who include this file having 
-    a dependency on windows.h and mmsystem.h, and also to to avoid having
-    to write separate packing pragmas for each compiler.
-*/
-#define PAWIN_SIZEOF_WAVEFORMATEX   18
-#define PAWIN_SIZEOF_WAVEFORMATEXTENSIBLE (PAWIN_SIZEOF_WAVEFORMATEX + 22)
-
-typedef struct{
-    unsigned char fields[ PAWIN_SIZEOF_WAVEFORMATEXTENSIBLE ];
-    unsigned long extraLongForAlignment; /* ensure that compiler aligns struct to DWORD */ 
-} PaWinWaveFormat;
-
-/*
-    WAVEFORMATEXTENSIBLE fields:
-    
-    union  {
-	    WORD  wValidBitsPerSample;    
-	    WORD  wSamplesPerBlock;    
-	    WORD  wReserved;  
-    } Samples;
-    DWORD  dwChannelMask;  
-    GUID  SubFormat;
-*/
-
-#define PAWIN_INDEXOF_WVALIDBITSPERSAMPLE	(PAWIN_SIZEOF_WAVEFORMATEX+0)
-#define PAWIN_INDEXOF_DWCHANNELMASK			(PAWIN_SIZEOF_WAVEFORMATEX+2)
-#define PAWIN_INDEXOF_SUBFORMAT				(PAWIN_SIZEOF_WAVEFORMATEX+6)
-
-
-/*
-    Valid values to pass for the waveFormatTag PaWin_InitializeWaveFormatEx and
-    PaWin_InitializeWaveFormatExtensible functions below. These must match
-    the standard Windows WAVE_FORMAT_* values.
-*/
-#define PAWIN_WAVE_FORMAT_PCM               (1)
-#define PAWIN_WAVE_FORMAT_IEEE_FLOAT        (3)
-#define PAWIN_WAVE_FORMAT_DOLBY_AC3_SPDIF   (0x0092)
-#define PAWIN_WAVE_FORMAT_WMA_SPDIF         (0x0164)
-
-
-/*
-    returns PAWIN_WAVE_FORMAT_PCM or PAWIN_WAVE_FORMAT_IEEE_FLOAT
-    depending on the sampleFormat parameter.
-*/
-int PaWin_SampleFormatToLinearWaveFormatTag( PaSampleFormat sampleFormat );
-
-/*
-	Use the following two functions to initialize the waveformat structure.
-*/
-
-void PaWin_InitializeWaveFormatEx( PaWinWaveFormat *waveFormat, 
-		int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate );
-
-
-void PaWin_InitializeWaveFormatExtensible( PaWinWaveFormat *waveFormat, 
-		int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate,
-	    PaWinWaveFormatChannelMask channelMask );
-
-
-/* Map a channel count to a speaker channel mask */
-PaWinWaveFormatChannelMask PaWin_DefaultChannelMask( int numChannels );
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
+#ifndef PA_WIN_WAVEFORMAT_H
+#define PA_WIN_WAVEFORMAT_H
+
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Windows WAVEFORMAT* data structure utilities
+ * portaudio.h should be included before this file.
+ *
+ * Copyright (c) 2007 Ross Bencina
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+/** @file
+ @ingroup public_header
+ @brief Windows specific PortAudio API extension and utilities header file.
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+	The following #defines for speaker channel masks are the same
+	as those in ksmedia.h, except with PAWIN_ prepended, KSAUDIO_ removed
+	in some cases, and casts to PaWinWaveFormatChannelMask added.
+*/
+
+typedef unsigned long PaWinWaveFormatChannelMask;
+
+/* Speaker Positions: */
+#define PAWIN_SPEAKER_FRONT_LEFT				((PaWinWaveFormatChannelMask)0x1)
+#define PAWIN_SPEAKER_FRONT_RIGHT				((PaWinWaveFormatChannelMask)0x2)
+#define PAWIN_SPEAKER_FRONT_CENTER				((PaWinWaveFormatChannelMask)0x4)
+#define PAWIN_SPEAKER_LOW_FREQUENCY				((PaWinWaveFormatChannelMask)0x8)
+#define PAWIN_SPEAKER_BACK_LEFT					((PaWinWaveFormatChannelMask)0x10)
+#define PAWIN_SPEAKER_BACK_RIGHT				((PaWinWaveFormatChannelMask)0x20)
+#define PAWIN_SPEAKER_FRONT_LEFT_OF_CENTER		((PaWinWaveFormatChannelMask)0x40)
+#define PAWIN_SPEAKER_FRONT_RIGHT_OF_CENTER		((PaWinWaveFormatChannelMask)0x80)
+#define PAWIN_SPEAKER_BACK_CENTER				((PaWinWaveFormatChannelMask)0x100)
+#define PAWIN_SPEAKER_SIDE_LEFT					((PaWinWaveFormatChannelMask)0x200)
+#define PAWIN_SPEAKER_SIDE_RIGHT				((PaWinWaveFormatChannelMask)0x400)
+#define PAWIN_SPEAKER_TOP_CENTER				((PaWinWaveFormatChannelMask)0x800)
+#define PAWIN_SPEAKER_TOP_FRONT_LEFT			((PaWinWaveFormatChannelMask)0x1000)
+#define PAWIN_SPEAKER_TOP_FRONT_CENTER			((PaWinWaveFormatChannelMask)0x2000)
+#define PAWIN_SPEAKER_TOP_FRONT_RIGHT			((PaWinWaveFormatChannelMask)0x4000)
+#define PAWIN_SPEAKER_TOP_BACK_LEFT				((PaWinWaveFormatChannelMask)0x8000)
+#define PAWIN_SPEAKER_TOP_BACK_CENTER			((PaWinWaveFormatChannelMask)0x10000)
+#define PAWIN_SPEAKER_TOP_BACK_RIGHT			((PaWinWaveFormatChannelMask)0x20000)
+
+/* Bit mask locations reserved for future use */
+#define PAWIN_SPEAKER_RESERVED					((PaWinWaveFormatChannelMask)0x7FFC0000)
+
+/* Used to specify that any possible permutation of speaker configurations */
+#define PAWIN_SPEAKER_ALL						((PaWinWaveFormatChannelMask)0x80000000)
+
+/* DirectSound Speaker Config */
+#define PAWIN_SPEAKER_DIRECTOUT					0
+#define PAWIN_SPEAKER_MONO						(PAWIN_SPEAKER_FRONT_CENTER)
+#define PAWIN_SPEAKER_STEREO					(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT)
+#define PAWIN_SPEAKER_QUAD						(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+												PAWIN_SPEAKER_BACK_LEFT  | PAWIN_SPEAKER_BACK_RIGHT)
+#define PAWIN_SPEAKER_SURROUND					(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_BACK_CENTER)
+#define PAWIN_SPEAKER_5POINT1					(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
+												PAWIN_SPEAKER_BACK_LEFT  | PAWIN_SPEAKER_BACK_RIGHT)
+#define PAWIN_SPEAKER_7POINT1					(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
+												PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT | \
+												PAWIN_SPEAKER_FRONT_LEFT_OF_CENTER | PAWIN_SPEAKER_FRONT_RIGHT_OF_CENTER)
+#define PAWIN_SPEAKER_5POINT1_SURROUND			(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
+												PAWIN_SPEAKER_SIDE_LEFT  | PAWIN_SPEAKER_SIDE_RIGHT)
+#define PAWIN_SPEAKER_7POINT1_SURROUND			(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
+												PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT | \
+												PAWIN_SPEAKER_SIDE_LEFT | PAWIN_SPEAKER_SIDE_RIGHT)
+/*
+ According to the Microsoft documentation:
+ The following are obsolete 5.1 and 7.1 settings (they lack side speakers).  Note this means
+ that the default 5.1 and 7.1 settings (KSAUDIO_SPEAKER_5POINT1 and KSAUDIO_SPEAKER_7POINT1 are
+ similarly obsolete but are unchanged for compatibility reasons).
+*/
+#define PAWIN_SPEAKER_5POINT1_BACK				PAWIN_SPEAKER_5POINT1
+#define PAWIN_SPEAKER_7POINT1_WIDE				PAWIN_SPEAKER_7POINT1
+
+/* DVD Speaker Positions */
+#define PAWIN_SPEAKER_GROUND_FRONT_LEFT			PAWIN_SPEAKER_FRONT_LEFT
+#define PAWIN_SPEAKER_GROUND_FRONT_CENTER		PAWIN_SPEAKER_FRONT_CENTER
+#define PAWIN_SPEAKER_GROUND_FRONT_RIGHT		PAWIN_SPEAKER_FRONT_RIGHT
+#define PAWIN_SPEAKER_GROUND_REAR_LEFT			PAWIN_SPEAKER_BACK_LEFT
+#define PAWIN_SPEAKER_GROUND_REAR_RIGHT			PAWIN_SPEAKER_BACK_RIGHT
+#define PAWIN_SPEAKER_TOP_MIDDLE				PAWIN_SPEAKER_TOP_CENTER
+#define PAWIN_SPEAKER_SUPER_WOOFER				PAWIN_SPEAKER_LOW_FREQUENCY
+
+
+/*
+	PaWinWaveFormat is defined here to provide compatibility with
+	compilation environments which don't have headers defining 
+	WAVEFORMATEXTENSIBLE (e.g. older versions of MSVC, Borland C++ etc.
+
+	The fields for WAVEFORMATEX and WAVEFORMATEXTENSIBLE are declared as an
+    unsigned char array here to avoid clients who include this file having 
+    a dependency on windows.h and mmsystem.h, and also to to avoid having
+    to write separate packing pragmas for each compiler.
+*/
+#define PAWIN_SIZEOF_WAVEFORMATEX   18
+#define PAWIN_SIZEOF_WAVEFORMATEXTENSIBLE (PAWIN_SIZEOF_WAVEFORMATEX + 22)
+
+typedef struct{
+    unsigned char fields[ PAWIN_SIZEOF_WAVEFORMATEXTENSIBLE ];
+    unsigned long extraLongForAlignment; /* ensure that compiler aligns struct to DWORD */ 
+} PaWinWaveFormat;
+
+/*
+    WAVEFORMATEXTENSIBLE fields:
+    
+    union  {
+	    WORD  wValidBitsPerSample;    
+	    WORD  wSamplesPerBlock;    
+	    WORD  wReserved;  
+    } Samples;
+    DWORD  dwChannelMask;  
+    GUID  SubFormat;
+*/
+
+#define PAWIN_INDEXOF_WVALIDBITSPERSAMPLE	(PAWIN_SIZEOF_WAVEFORMATEX+0)
+#define PAWIN_INDEXOF_DWCHANNELMASK			(PAWIN_SIZEOF_WAVEFORMATEX+2)
+#define PAWIN_INDEXOF_SUBFORMAT				(PAWIN_SIZEOF_WAVEFORMATEX+6)
+
+
+/*
+    Valid values to pass for the waveFormatTag PaWin_InitializeWaveFormatEx and
+    PaWin_InitializeWaveFormatExtensible functions below. These must match
+    the standard Windows WAVE_FORMAT_* values.
+*/
+#define PAWIN_WAVE_FORMAT_PCM               (1)
+#define PAWIN_WAVE_FORMAT_IEEE_FLOAT        (3)
+#define PAWIN_WAVE_FORMAT_DOLBY_AC3_SPDIF   (0x0092)
+#define PAWIN_WAVE_FORMAT_WMA_SPDIF         (0x0164)
+
+
+/*
+    returns PAWIN_WAVE_FORMAT_PCM or PAWIN_WAVE_FORMAT_IEEE_FLOAT
+    depending on the sampleFormat parameter.
+*/
+int PaWin_SampleFormatToLinearWaveFormatTag( PaSampleFormat sampleFormat );
+
+/*
+	Use the following two functions to initialize the waveformat structure.
+*/
+
+void PaWin_InitializeWaveFormatEx( PaWinWaveFormat *waveFormat, 
+		int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate );
+
+
+void PaWin_InitializeWaveFormatExtensible( PaWinWaveFormat *waveFormat, 
+		int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate,
+	    PaWinWaveFormatChannelMask channelMask );
+
+
+/* Map a channel count to a speaker channel mask */
+PaWinWaveFormatChannelMask PaWin_DefaultChannelMask( int numChannels );
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* PA_WIN_WAVEFORMAT_H */
\ No newline at end of file
--- a/win64-msvc/include/pa_win_wdmks.h	Mon Jan 09 13:57:37 2017 +0000
+++ b/win64-msvc/include/pa_win_wdmks.h	Tue Jan 10 11:28:20 2017 +0000
@@ -1,7 +1,7 @@
 #ifndef PA_WIN_WDMKS_H
 #define PA_WIN_WDMKS_H
 /*
- * $Id: pa_win_wdmks.h 1812 2012-02-14 09:32:57Z robiwan $
+ * $Id$
  * PortAudio Portable Real-Time Audio Library
  * WDM/KS specific extensions
  *
@@ -52,13 +52,44 @@
 extern "C"
 {
 #endif /* __cplusplus */
+
+    /** Flags to indicate valid fields in PaWinWDMKSInfo.
+     @see PaWinWDMKSInfo
+     @version Available as of 19.5.0.
+    */
+    typedef enum PaWinWDMKSFlags
+    {
+        /** Makes WDMKS use the supplied latency figures instead of relying on the frame size reported
+         by the WaveCyclic device. Use at own risk!
+        */
+        paWinWDMKSOverrideFramesize   = (1 << 0),
+
+        /** Makes WDMKS (output stream) use the given channelMask instead of the default.
+          @version Available as of 19.5.0.
+        */
+        paWinWDMKSUseGivenChannelMask = (1 << 1),
+
+    } PaWinWDMKSFlags;
+
     typedef struct PaWinWDMKSInfo{
         unsigned long size;             /**< sizeof(PaWinWDMKSInfo) */
         PaHostApiTypeId hostApiType;    /**< paWDMKS */
         unsigned long version;          /**< 1 */
 
-        /* The number of packets to use for WaveCyclic devices, range is [2, 8]. Set to zero for default value of 2. */
+        /** Flags indicate which fields are valid.
+         @see PaWinWDMKSFlags
+         @version Available as of 19.5.0.
+        */
+        unsigned long flags;
+
+        /** The number of packets to use for WaveCyclic devices, range is [2, 8]. Set to zero for default value of 2. */
         unsigned noOfPackets;
+
+        /** If paWinWDMKSUseGivenChannelMask bit is set in flags, use this as channelMask instead of default.
+         @see PaWinWDMKSFlags
+         @version Available as of 19.5.0.
+        */
+        unsigned channelMask;
     } PaWinWDMKSInfo;
 
     typedef enum PaWDMKSType
--- a/win64-msvc/include/pa_win_wmme.h	Mon Jan 09 13:57:37 2017 +0000
+++ b/win64-msvc/include/pa_win_wmme.h	Tue Jan 10 11:28:20 2017 +0000
@@ -1,7 +1,7 @@
 #ifndef PA_WIN_WMME_H
 #define PA_WIN_WMME_H
 /*
- * $Id: pa_win_wmme.h 1592 2011-02-04 10:41:58Z rossb $
+ * $Id$
  * PortAudio Portable Real-Time Audio Library
  * MME specific extensions
  *
--- a/win64-msvc/include/portaudio.h	Mon Jan 09 13:57:37 2017 +0000
+++ b/win64-msvc/include/portaudio.h	Tue Jan 10 11:28:20 2017 +0000
@@ -1,7 +1,7 @@
 #ifndef PORTAUDIO_H
 #define PORTAUDIO_H
 /*
- * $Id: portaudio.h 1859 2012-09-01 00:10:13Z philburk $
+ * $Id$
  * PortAudio Portable Real-Time Audio Library
  * PortAudio API Header File
  * Latest version available at: http://www.portaudio.com/
@@ -50,18 +50,69 @@
 {
 #endif /* __cplusplus */
 
- 
-/** Retrieve the release number of the currently running PortAudio build,
- eg 1900.
+/** Retrieve the release number of the currently running PortAudio build.
+ For example, for version "19.5.1" this will return 0x00130501.
+
+ @see paMakeVersionNumber
 */
 int Pa_GetVersion( void );
 
+/** Retrieve a textual description of the current PortAudio build,
+ e.g. "PortAudio V19.5.0-devel, revision 1952M".
+ The format of the text may change in the future. Do not try to parse the
+ returned string.
 
-/** Retrieve a textual description of the current PortAudio build,
- eg "PortAudio V19-devel 13 October 2002".
+ @deprecated As of 19.5.0, use Pa_GetVersionInfo()->versionText instead.
 */
 const char* Pa_GetVersionText( void );
 
+/**
+ Generate a packed integer version number in the same format used
+ by Pa_GetVersion(). Use this to compare a specified version number with
+ the currently running version. For example:
+
+ @code
+     if( Pa_GetVersion() < paMakeVersionNumber(19,5,1) ) {}
+ @endcode
+
+ @see Pa_GetVersion, Pa_GetVersionInfo
+ @version Available as of 19.5.0.
+*/
+#define paMakeVersionNumber(major, minor, subminor) \
+    (((major)&0xFF)<<16 | ((minor)&0xFF)<<8 | ((subminor)&0xFF))
+
+
+/**
+ A structure containing PortAudio API version information.
+ @see Pa_GetVersionInfo, paMakeVersionNumber
+ @version Available as of 19.5.0.
+*/
+typedef struct PaVersionInfo {
+    int versionMajor;
+    int versionMinor;
+    int versionSubMinor;
+    /**
+     This is currently the Git revision hash but may change in the future.
+     The versionControlRevision is updated by running a script before compiling the library.
+     If the update does not occur, this value may refer to an earlier revision.
+    */
+    const char *versionControlRevision;
+    /** Version as a string, for example "PortAudio V19.5.0-devel, revision 1952M" */
+    const char *versionText;
+} PaVersionInfo;
+    
+/** Retrieve version information for the currently running PortAudio build.
+ @return A pointer to an immutable PaVersionInfo structure.
+
+ @note This function can be called at any time. It does not require PortAudio
+ to be initialized. The structure pointed to is statically allocated. Do not
+ attempt to free it or modify it.
+
+ @see PaVersionInfo, paMakeVersionNumber
+ @version Available as of 19.5.0.
+*/
+const PaVersionInfo* Pa_GetVersionInfo();
+
 
 /** Error codes returned by PortAudio functions.
  Note that with the exception of paNoError, all PaErrorCodes are negative.
@@ -900,7 +951,7 @@
  (ie once a call to Pa_StopStream() will not block).
  A stream will become inactive after the stream callback returns non-zero,
  or when Pa_StopStream or Pa_AbortStream is called. For a stream providing audio
- output, if the stream callback returns paComplete, or Pa_StopStream is called,
+ output, if the stream callback returns paComplete, or Pa_StopStream() is called,
  the stream finished callback will not be called until all generated sample data
  has been played.
  
@@ -1098,7 +1149,7 @@
 
 
 /** Write samples to an output stream. This function doesn't return until the
- entire buffer has been consumed - this may involve waiting for the operating
+ entire buffer has been written - this may involve waiting for the operating
  system to consume the data.
 
  @param stream A pointer to an open stream previously created with Pa_OpenStream.
Binary file win64-msvc/lib/portaudio.lib has changed