mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-07 22:02:12 +08:00
contrib(win32): use WASAPI as the only PortAudio host api
The DirectSound host api implementation in PortAudio has multiple issues: - requires utf8 support patch - can't enumerate the default communication devices - reports incorrect default sample-rates for devices The WASAPI host api implementation needs to be patched to access the default comm devices, but functions better out-of-the-box. Change-Id: Ie27ee3e1418dd6d734ad6ad7685f2dc44db86007 Gitlab: #463
This commit is contained in:
124
CMakeLists.txt
124
CMakeLists.txt
@ -163,6 +163,7 @@ if(MSVC)
|
|||||||
"${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjmedia/include"
|
"${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjmedia/include"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/speexdsp/include;"
|
"${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/speexdsp/include;"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/webrtc-audio-processing"
|
"${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/webrtc-audio-processing"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/portaudio/include"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -171,18 +172,16 @@ if(MSVC)
|
|||||||
################################################################################
|
################################################################################
|
||||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||||
"$<$<CONFIG:ReleaseLib_win32>:"
|
"_WIN32_WINNT=0x0A00;"
|
||||||
"_WIN32_WINNT=0x0A00;"
|
"ASIO_STANDALONE;"
|
||||||
"ASIO_STANDALONE;"
|
"STATIC_GETOPT;"
|
||||||
"STATIC_GETOPT;"
|
"LIBARCHIVE_STATIC;"
|
||||||
"LIBARCHIVE_STATIC;"
|
"OPENDHT_PROXY_CLIENT;"
|
||||||
"OPENDHT_PROXY_CLIENT;"
|
"OPENDHT_PROXY_SERVER;"
|
||||||
"OPENDHT_PROXY_SERVER;"
|
"OPENDHT_PUSH_NOTIFICATIONS;"
|
||||||
"OPENDHT_PUSH_NOTIFICATIONS;"
|
"NATPMP_STATICLIB;"
|
||||||
"NATPMP_STATICLIB;"
|
"ENABLE_PLUGIN;"
|
||||||
"ENABLE_PLUGIN;"
|
"NDEBUG;"
|
||||||
"NDEBUG;"
|
|
||||||
">"
|
|
||||||
"_USE_MATH_DEFINES;"
|
"_USE_MATH_DEFINES;"
|
||||||
"_SCL_SECURE_NO_WARNINGS;"
|
"_SCL_SECURE_NO_WARNINGS;"
|
||||||
"_CRT_SECURE_NO_WARNINGS;"
|
"_CRT_SECURE_NO_WARNINGS;"
|
||||||
@ -200,18 +199,16 @@ if(MSVC)
|
|||||||
################################################################################
|
################################################################################
|
||||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||||
target_compile_options(${PROJECT_NAME} PRIVATE
|
target_compile_options(${PROJECT_NAME} PRIVATE
|
||||||
$<$<CONFIG:ReleaseLib_win32>:
|
/O2;
|
||||||
/O2;
|
/Oi;
|
||||||
/Oi;
|
${DEFAULT_CXX_RUNTIME_LIBRARY};
|
||||||
${DEFAULT_CXX_RUNTIME_LIBRARY};
|
/Gy;
|
||||||
/Gy;
|
/MP;
|
||||||
/MP;
|
/Oy-;
|
||||||
/Oy-;
|
/sdl-;
|
||||||
/sdl-;
|
/W0;
|
||||||
/W0;
|
/FC;
|
||||||
/FC;
|
/FS
|
||||||
/FS
|
|
||||||
>
|
|
||||||
/nologo;
|
/nologo;
|
||||||
/Zi;
|
/Zi;
|
||||||
/wd4996;
|
/wd4996;
|
||||||
@ -224,11 +221,9 @@ if(MSVC)
|
|||||||
endif()
|
endif()
|
||||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||||
target_link_options(${PROJECT_NAME} PRIVATE
|
target_link_options(${PROJECT_NAME} PRIVATE
|
||||||
$<$<CONFIG:ReleaseLib_win32>:
|
/MACHINE:X64;
|
||||||
/MACHINE:X86;
|
/OPT:REF;
|
||||||
/OPT:REF;
|
/OPT:ICF
|
||||||
/OPT:ICF
|
|
||||||
>
|
|
||||||
/VERBOSE:LIB;
|
/VERBOSE:LIB;
|
||||||
/NODEFAULTLIB:libcmtd;
|
/NODEFAULTLIB:libcmtd;
|
||||||
/NODEFAULTLIB:libcmt;
|
/NODEFAULTLIB:libcmt;
|
||||||
@ -243,42 +238,41 @@ if(MSVC)
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
set(libAdditionalDependencies "${CMAKE_STATIC_LINKER_FLAGS} /LTCG
|
set(libAdditionalDependencies "${CMAKE_STATIC_LINKER_FLAGS} /LTCG
|
||||||
ws2_32.lib
|
ws2_32.lib
|
||||||
advapi32.lib
|
advapi32.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/ffmpeg/Build/win32/x64/bin/avcodec.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/ffmpeg/Build/win32/x64/bin/avcodec.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/ffmpeg/Build/win32/x64/bin/avdevice.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/ffmpeg/Build/win32/x64/bin/avdevice.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/ffmpeg/Build/win32/x64/bin/avfilter.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/ffmpeg/Build/win32/x64/bin/avfilter.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/ffmpeg/Build/win32/x64/bin/avformat.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/ffmpeg/Build/win32/x64/bin/avformat.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/ffmpeg/Build/win32/x64/bin/avutil.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/ffmpeg/Build/win32/x64/bin/avutil.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/ffmpeg/Build/win32/x64/bin/swresample.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/ffmpeg/Build/win32/x64/bin/swresample.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/ffmpeg/Build/win32/x64/bin/swscale.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/ffmpeg/Build/win32/x64/bin/swscale.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/msvc/lib/x64/libgnutls.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/msvc/lib/x64/libgnutls.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/msvc/lib/x64/lib_json.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/msvc/lib/x64/lib_json.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/opendht/build/Release/libopendht.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/opendht/build/Release/libopendht.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/argon2/vs2015/Argon2Ref/vs2015/build/Argon2Ref.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/argon2/vs2015/Argon2Ref/vs2015/build/Argon2Ref.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/msvc/lib/x64/secp256k1.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/msvc/lib/x64/secp256k1.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/yaml-cpp/msvc/Release/libyaml-cppmd.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/yaml-cpp/msvc/Release/libyaml-cppmd.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/msvc/lib/x64/portaudio.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/msvc/lib/x64/libupnp.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/msvc/lib/x64/libupnp.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/natpmp/msvc/Release/natpmp.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/natpmp/msvc/Release/natpmp.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/msvc/lib/x64/archive_static.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/msvc/lib/x64/archive_static.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjsip/lib/pjsip-core-x86_64-x64-vc15-Release.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjsip/lib/pjsip-core-x86_64-x64-vc15-Release.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjsip/lib/pjsip-simple-x86_64-x64-vc15-Release.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjsip/lib/pjsip-simple-x86_64-x64-vc15-Release.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjsip/lib/pjsua2-lib-x86_64-x64-vc15-Release.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjsip/lib/pjsua2-lib-x86_64-x64-vc15-Release.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjsip/lib/pjsua-lib-x86_64-x64-vc15-Release.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjsip/lib/pjsua-lib-x86_64-x64-vc15-Release.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjsip/lib/pjsip-ua-x86_64-x64-vc15-Release.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjsip/lib/pjsip-ua-x86_64-x64-vc15-Release.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjmedia/lib/pjmedia-x86_64-x64-vc15-Release.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjmedia/lib/pjmedia-x86_64-x64-vc15-Release.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjlib-util/lib/pjlib-util-x86_64-x64-vc15-Release.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjlib-util/lib/pjlib-util-x86_64-x64-vc15-Release.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjlib/lib/pjlib-x86_64-x64-vc15-Release.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjlib/lib/pjlib-x86_64-x64-vc15-Release.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjnath/lib/pjnath-x86_64-x64-vc15-Release.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjnath/lib/pjnath-x86_64-x64-vc15-Release.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/fmt/msvc/Release/fmt.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/fmt/msvc/Release/fmt.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/http_parser/x64/Release/http-parser.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/http_parser/x64/Release/http-parser.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/openssl/libcrypto.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/openssl/libcrypto.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/openssl/libssl.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/openssl/libssl.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/speexdsp/lib/libspeexdsp.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/speexdsp/lib/libspeexdsp.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/webrtc-audio-processing/build/Release/webrtc-audio-processing.lib
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/webrtc-audio-processing/build/Release/webrtc-audio-processing.lib
|
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/portaudio/build/Release/portaudio_static_x64.lib
|
||||||
/ignore:4006
|
/ignore:4006"
|
||||||
"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set ( CMAKE_STATIC_LINKER_FLAGS ${libAdditionalDependencies} )
|
set ( CMAKE_STATIC_LINKER_FLAGS ${libAdditionalDependencies} )
|
||||||
|
@ -283,11 +283,11 @@ def make(pkg_info, force, sdk_version, toolset, isPlugin):
|
|||||||
if use_cmake:
|
if use_cmake:
|
||||||
cmake_defines = ""
|
cmake_defines = ""
|
||||||
for define in pkg_info.get('defines', []):
|
for define in pkg_info.get('defines', []):
|
||||||
cmake_defines += " -D" + define + " "
|
cmake_defines += " -D" + define
|
||||||
if not pkg_up_to_date or current_version is None or force:
|
if not pkg_up_to_date or current_version is None or force:
|
||||||
cmake_conf_script = "cmake -G " + getCMakeGenerator(getLatestVSVersion(
|
cmake_conf_script = "cmake -G " + getCMakeGenerator(getLatestVSVersion(
|
||||||
)) + cmake_defines + " -S '" + pkg_build_path + "' -B '" + pkg_build_path + "\\build'"
|
)) + cmake_defines + " -S '" + pkg_build_path + "' -B '" + pkg_build_path + "\\build'"
|
||||||
log.debug("Configuring with Cmake", cmake_conf_script)
|
log.debug("Configuring with Cmake")
|
||||||
result = getSHrunner().exec_batch(cmake_conf_script)
|
result = getSHrunner().exec_batch(cmake_conf_script)
|
||||||
if result[0] != 0:
|
if result[0] != 0:
|
||||||
log.error("Error configuring with CMake")
|
log.error("Error configuring with CMake")
|
||||||
|
@ -1,62 +0,0 @@
|
|||||||
--- portaudio/src/hostapi/dsound/pa_win_ds.c 2012-11-09 21:55:20.000000000 -0500
|
|
||||||
+++ pa_win_ds.c 2016-03-17 16:49:30.106201019 -0400
|
|
||||||
@@ -208,9 +208,9 @@
|
|
||||||
PaUtil_SetLastHostErrorInfo( paDirectSound, hr, "DirectSound error" )
|
|
||||||
|
|
||||||
/************************************************* DX Prototypes **********/
|
|
||||||
-static BOOL CALLBACK CollectGUIDsProcA(LPGUID lpGUID,
|
|
||||||
- LPCSTR lpszDesc,
|
|
||||||
- LPCSTR lpszDrvName,
|
|
||||||
+static BOOL CALLBACK CollectGUIDsProcW(LPGUID lpGUID,
|
|
||||||
+ LPCWSTR lpszDesc,
|
|
||||||
+ LPCWSTR lpszDrvName,
|
|
||||||
LPVOID lpContext );
|
|
||||||
|
|
||||||
/************************************************************************************/
|
|
||||||
@@ -389,16 +389,18 @@
|
|
||||||
** A NULL string is converted to a zero length string.
|
|
||||||
** If memory cannot be allocated, NULL is returned.
|
|
||||||
**/
|
|
||||||
-static char *DuplicateDeviceNameString( PaUtilAllocationGroup *allocations, const char* src )
|
|
||||||
+static char *DuplicateDeviceNameString( PaUtilAllocationGroup *allocations, const wchar_t* src )
|
|
||||||
{
|
|
||||||
char *result = 0;
|
|
||||||
|
|
||||||
if( src != NULL )
|
|
||||||
{
|
|
||||||
- size_t len = strlen(src);
|
|
||||||
+ size_t len = WideCharToMultiByte(CP_UTF8, 0, src, -1, NULL, 0, NULL, NULL);
|
|
||||||
result = (char*)PaUtil_GroupAllocateMemory( allocations, (long)(len + 1) );
|
|
||||||
if( result )
|
|
||||||
- memcpy( (void *) result, src, len+1 );
|
|
||||||
+ if (WideCharToMultiByte(CP_UTF8, 0, src, -1, result, (int)len, NULL, NULL) == 0) {
|
|
||||||
+ result = 0;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@@ -513,9 +515,9 @@
|
|
||||||
/************************************************************************************
|
|
||||||
** Collect preliminary device information during DirectSound enumeration
|
|
||||||
*/
|
|
||||||
-static BOOL CALLBACK CollectGUIDsProcA(LPGUID lpGUID,
|
|
||||||
- LPCSTR lpszDesc,
|
|
||||||
- LPCSTR lpszDrvName,
|
|
||||||
+static BOOL CALLBACK CollectGUIDsProcW(LPGUID lpGUID,
|
|
||||||
+ LPCWSTR lpszDesc,
|
|
||||||
+ LPCWSTR lpszDrvName,
|
|
||||||
LPVOID lpContext )
|
|
||||||
{
|
|
||||||
DSDeviceNameAndGUIDVector *namesAndGUIDs = (DSDeviceNameAndGUIDVector*)lpContext;
|
|
||||||
@@ -1211,9 +1213,9 @@
|
|
||||||
if( result != paNoError )
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
- paWinDsDSoundEntryPoints.DirectSoundCaptureEnumerateA( (LPDSENUMCALLBACKA)CollectGUIDsProcA, (void *)&deviceNamesAndGUIDs.inputNamesAndGUIDs );
|
|
||||||
+ paWinDsDSoundEntryPoints.DirectSoundCaptureEnumerateW( (LPDSENUMCALLBACKW)CollectGUIDsProcW, (void *)&deviceNamesAndGUIDs.inputNamesAndGUIDs );
|
|
||||||
|
|
||||||
- paWinDsDSoundEntryPoints.DirectSoundEnumerateA( (LPDSENUMCALLBACKA)CollectGUIDsProcA, (void *)&deviceNamesAndGUIDs.outputNamesAndGUIDs );
|
|
||||||
+ paWinDsDSoundEntryPoints.DirectSoundEnumerateW( (LPDSENUMCALLBACKW)CollectGUIDsProcW, (void *)&deviceNamesAndGUIDs.outputNamesAndGUIDs );
|
|
||||||
|
|
||||||
if( deviceNamesAndGUIDs.inputNamesAndGUIDs.enumerationError != paNoError )
|
|
||||||
{
|
|
@ -1,65 +0,0 @@
|
|||||||
--- a/src/hostapi/dsound/pa_win_ds.c
|
|
||||||
+++ b/src/hostapi/dsound/pa_win_ds.c
|
|
||||||
@@ -1520,12 +1520,33 @@ static HRESULT InitFullDuplexInputOutputBuffers( PaWinDsStream *stream,
|
|
||||||
hostInputSampleFormat, PaWin_SampleFormatToLinearWaveFormatTag( hostInputSampleFormat ),
|
|
||||||
nFrameRate, inputChannelMask );
|
|
||||||
|
|
||||||
+ // aec and noise suppression
|
|
||||||
+ DSCEFFECTDESC dscfx[2];
|
|
||||||
+ ZeroMemory(&dscfx[0], sizeof(DSCEFFECTDESC));
|
|
||||||
+ dscfx[0].dwSize = sizeof(DSCEFFECTDESC);
|
|
||||||
+ dscfx[0].dwFlags = DSCFX_LOCSOFTWARE;
|
|
||||||
+ dscfx[0].guidDSCFXClass = GUID_DSCFX_CLASS_AEC;
|
|
||||||
+ dscfx[0].guidDSCFXInstance = GUID_DSCFX_MS_AEC;
|
|
||||||
+ dscfx[0].dwReserved1 = 0;
|
|
||||||
+ dscfx[0].dwReserved2 = 0;
|
|
||||||
+
|
|
||||||
+ ZeroMemory(&dscfx[1], sizeof(DSCEFFECTDESC));
|
|
||||||
+ dscfx[1].dwSize = sizeof(DSCEFFECTDESC);
|
|
||||||
+ dscfx[1].dwFlags = DSCFX_LOCSOFTWARE;
|
|
||||||
+ dscfx[1].guidDSCFXClass = GUID_DSCFX_CLASS_NS;
|
|
||||||
+ dscfx[1].guidDSCFXInstance = GUID_DSCFX_MS_NS;
|
|
||||||
+ dscfx[1].dwReserved1 = 0;
|
|
||||||
+ dscfx[1].dwReserved2 = 0;
|
|
||||||
+
|
|
||||||
ZeroMemory(&captureDesc, sizeof(DSCBUFFERDESC));
|
|
||||||
captureDesc.dwSize = sizeof(DSCBUFFERDESC);
|
|
||||||
- captureDesc.dwFlags = 0;
|
|
||||||
captureDesc.dwBufferBytes = bytesPerInputBuffer;
|
|
||||||
captureDesc.lpwfxFormat = (WAVEFORMATEX*)&captureWaveFormat;
|
|
||||||
|
|
||||||
+ captureDesc.dwFlags = DSCBCAPS_CTRLFX;
|
|
||||||
+ captureDesc.dwFXCount = 2;
|
|
||||||
+ captureDesc.lpDSCFXDesc = dscfx;
|
|
||||||
+
|
|
||||||
// render buffer description
|
|
||||||
|
|
||||||
PaWin_InitializeWaveFormatExtensible( &renderWaveFormat, outputChannelCount,
|
|
||||||
@@ -1551,6 +1572,24 @@ static HRESULT InitFullDuplexInputOutputBuffers( PaWinDsStream *stream,
|
|
||||||
NULL /* pUnkOuter must be NULL */
|
|
||||||
);
|
|
||||||
|
|
||||||
+ if (hr != DS_OK) {
|
|
||||||
+ PA_DEBUG(("DirectSoundFullDuplexCreate(with AEC/NS) failed. hr=%d\n", hr));
|
|
||||||
+ // try removing AEC/NS
|
|
||||||
+ captureDesc.dwFlags = 0;
|
|
||||||
+ captureDesc.dwFXCount = 0;
|
|
||||||
+ captureDesc.lpDSCFXDesc = NULL;
|
|
||||||
+ hr = paWinDsDSoundEntryPoints.DirectSoundFullDuplexCreate8(
|
|
||||||
+ inputDevice->lpGUID, outputDevice->lpGUID,
|
|
||||||
+ &captureDesc, &secondaryRenderDesc,
|
|
||||||
+ GetDesktopWindow(), /* see InitOutputBuffer() for a discussion of whether this is a good idea */
|
|
||||||
+ DSSCL_EXCLUSIVE,
|
|
||||||
+ &stream->pDirectSoundFullDuplex8,
|
|
||||||
+ &pCaptureBuffer8,
|
|
||||||
+ &pRenderBuffer8,
|
|
||||||
+ NULL /* pUnkOuter must be NULL */
|
|
||||||
+ );
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if( hr == DS_OK )
|
|
||||||
{
|
|
||||||
PA_DEBUG(("DirectSoundFullDuplexCreate succeeded!\n"));
|
|
||||||
--
|
|
||||||
2.19.0.windows.1
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
--- a/MSVC/portaudio.vcxproj
|
|
||||||
+++ b/MSVC/portaudio.vcxproj
|
|
||||||
@@ -109,7 +109,7 @@
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
|
||||||
<AdditionalIncludeDirectories>..\src\common;..\include;.\;..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
- <PreprocessorDefinitions>PA_WDMKS_NO_KSGUID_LIB;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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <PreprocessorDefinitions>PA_ENABLE_DEBUG_OUTPUT;PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE;PA_WDMKS_NO_KSGUID_LIB;WIN32;NDEBUG;_USRDLL;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=1;PA_USE_WMME=0;PA_USE_WASAPI=0;PA_USE_WDMKS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<StringPooling>true</StringPooling>
|
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
@@ -161,7 +161,7 @@ xcopy /S /Y $(ProjectDir)..\include\*.h "$(OutDir)"include</Command>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
|
||||||
<AdditionalIncludeDirectories>..\src\common;..\include;.\;..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
- <PreprocessorDefinitions>PA_WDMKS_NO_KSGUID_LIB;_WIN64;NDEBUG;_USRDLL;_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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <PreprocessorDefinitions>PA_ENABLE_DEBUG_OUTPUT;PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE;PA_WDMKS_NO_KSGUID_LIB;_WIN64;NDEBUG;_USRDLL;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=1;PA_USE_WMME=0;PA_USE_WASAPI=0;PA_USE_WDMKS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<StringPooling>true</StringPooling>
|
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
--
|
|
||||||
2.19.0.windows.1
|
|
||||||
|
|
@ -1,297 +0,0 @@
|
|||||||
--- /dev/null
|
|
||||||
+++ b/MSVC/uwp/portaudio.vcxproj
|
|
||||||
@@ -0,0 +1,242 @@
|
|
||||||
+<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
+ <ItemGroup Label="ProjectConfigurations">
|
|
||||||
+ <ProjectConfiguration Include="Debug|Win32">
|
|
||||||
+ <Configuration>Debug</Configuration>
|
|
||||||
+ <Platform>Win32</Platform>
|
|
||||||
+ </ProjectConfiguration>
|
|
||||||
+ <ProjectConfiguration Include="Debug|x64">
|
|
||||||
+ <Configuration>Debug</Configuration>
|
|
||||||
+ <Platform>x64</Platform>
|
|
||||||
+ </ProjectConfiguration>
|
|
||||||
+ <ProjectConfiguration Include="Release|Win32">
|
|
||||||
+ <Configuration>Release</Configuration>
|
|
||||||
+ <Platform>Win32</Platform>
|
|
||||||
+ </ProjectConfiguration>
|
|
||||||
+ <ProjectConfiguration Include="Release|x64">
|
|
||||||
+ <Configuration>Release</Configuration>
|
|
||||||
+ <Platform>x64</Platform>
|
|
||||||
+ </ProjectConfiguration>
|
|
||||||
+ </ItemGroup>
|
|
||||||
+ <PropertyGroup Label="Globals">
|
|
||||||
+ <ProjectGuid>{23913386-5333-4c93-b3f0-0227aff77b49}</ProjectGuid>
|
|
||||||
+ <Keyword>StaticLibrary</Keyword>
|
|
||||||
+ <RootNamespace>portaudio_UWP</RootNamespace>
|
|
||||||
+ <DefaultLanguage>en-US</DefaultLanguage>
|
|
||||||
+ <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
|
||||||
+ <AppContainerApplication>true</AppContainerApplication>
|
|
||||||
+ <ApplicationType>Windows Store</ApplicationType>
|
|
||||||
+ <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
|
||||||
+ <WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>
|
|
||||||
+ <ApplicationTypeRevision>10.0</ApplicationTypeRevision>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
+ <ConfigurationType>StaticLibrary</ConfigurationType>
|
|
||||||
+ <UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
+ <PlatformToolset>v141</PlatformToolset>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
+ <ConfigurationType>StaticLibrary</ConfigurationType>
|
|
||||||
+ <UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
+ <PlatformToolset>v141</PlatformToolset>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
+ <ConfigurationType>StaticLibrary</ConfigurationType>
|
|
||||||
+ <UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
+ <PlatformToolset>v141</PlatformToolset>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
+ <ConfigurationType>StaticLibrary</ConfigurationType>
|
|
||||||
+ <UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
+ <PlatformToolset>v141</PlatformToolset>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
+ <ImportGroup Label="ExtensionSettings">
|
|
||||||
+ </ImportGroup>
|
|
||||||
+ <ImportGroup Label="Shared">
|
|
||||||
+ </ImportGroup>
|
|
||||||
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
+ </ImportGroup>
|
|
||||||
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
+ </ImportGroup>
|
|
||||||
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
+ </ImportGroup>
|
|
||||||
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
+ </ImportGroup>
|
|
||||||
+ <PropertyGroup Label="UserMacros" />
|
|
||||||
+ <PropertyGroup />
|
|
||||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
+ <GenerateManifest>false</GenerateManifest>
|
|
||||||
+ <OutDir>$(ProjectDir)..\..\..\..\msvc\</OutDir>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
+ <GenerateManifest>false</GenerateManifest>
|
|
||||||
+ <OutDir>$(ProjectDir)..\..\..\..\msvc\</OutDir>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
+ <GenerateManifest>false</GenerateManifest>
|
|
||||||
+ <OutDir>$(ProjectDir)..\..\..\..\msvc\</OutDir>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
+ <GenerateManifest>false</GenerateManifest>
|
|
||||||
+ <OutDir>$(ProjectDir)..\..\..\..\msvc\</OutDir>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
+ <ClCompile>
|
|
||||||
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
||||||
+ <CompileAsWinRT>false</CompileAsWinRT>
|
|
||||||
+ <SDLCheck>true</SDLCheck>
|
|
||||||
+ <PreprocessorDefinitions>COBJMACROS;CINTERFACE;WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=0;PA_USE_WASAPI=1;PA_USE_WDMKS=0;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\include;$(ProjectDir)..\..\src\common;$(ProjectDir)..\..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
+ <ProgramDataBaseFileName>$(OutDir)\lib\x86\$(ProjectName).pdb</ProgramDataBaseFileName>
|
|
||||||
+ </ClCompile>
|
|
||||||
+ <Link>
|
|
||||||
+ <SubSystem>Console</SubSystem>
|
|
||||||
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
|
||||||
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
|
||||||
+ </Link>
|
|
||||||
+ <Lib>
|
|
||||||
+ <OutputFile>$(OutDir)\lib\x86\$(TargetName)$(TargetExt)</OutputFile>
|
|
||||||
+ </Lib>
|
|
||||||
+ <PostBuildEvent>
|
|
||||||
+ <Command>mkdir "$(OutDir)"include
|
|
||||||
+xcopy /S /Y $(ProjectDir)..\..\include\*.h "$(OutDir)"include
|
|
||||||
+del "$(OutDir)"portaudio_UWP.pri
|
|
||||||
+</Command>
|
|
||||||
+ </PostBuildEvent>
|
|
||||||
+ </ItemDefinitionGroup>
|
|
||||||
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
+ <ClCompile>
|
|
||||||
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
||||||
+ <CompileAsWinRT>false</CompileAsWinRT>
|
|
||||||
+ <SDLCheck>true</SDLCheck>
|
|
||||||
+ <PreprocessorDefinitions>COBJMACROS;CINTERFACE;WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=0;PA_USE_WASAPI=1;PA_USE_WDMKS=0;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\include;$(ProjectDir)..\..\src\common;$(ProjectDir)..\..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
+ <ProgramDataBaseFileName>$(OutDir)\lib\x86\$(ProjectName).pdb</ProgramDataBaseFileName>
|
|
||||||
+ </ClCompile>
|
|
||||||
+ <Link>
|
|
||||||
+ <SubSystem>Console</SubSystem>
|
|
||||||
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
|
||||||
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
|
||||||
+ </Link>
|
|
||||||
+ <Lib>
|
|
||||||
+ <OutputFile>$(OutDir)\lib\x86\$(TargetName)$(TargetExt)</OutputFile>
|
|
||||||
+ </Lib>
|
|
||||||
+ <PostBuildEvent>
|
|
||||||
+ <Command>mkdir "$(OutDir)"include
|
|
||||||
+xcopy /S /Y $(ProjectDir)..\..\include\*.h "$(OutDir)"include
|
|
||||||
+del "$(OutDir)"portaudio_UWP.pri
|
|
||||||
+</Command>
|
|
||||||
+ </PostBuildEvent>
|
|
||||||
+ </ItemDefinitionGroup>
|
|
||||||
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
|
|
||||||
+ <ClCompile>
|
|
||||||
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
||||||
+ <CompileAsWinRT>false</CompileAsWinRT>
|
|
||||||
+ <SDLCheck>true</SDLCheck>
|
|
||||||
+ <PreprocessorDefinitions>COBJMACROS;CINTERFACE;WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=0;PA_USE_WASAPI=1;PA_USE_WDMKS=0;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ </ClCompile>
|
|
||||||
+ <Link>
|
|
||||||
+ <SubSystem>Console</SubSystem>
|
|
||||||
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
|
||||||
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
|
||||||
+ </Link>
|
|
||||||
+ </ItemDefinitionGroup>
|
|
||||||
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'">
|
|
||||||
+ <ClCompile>
|
|
||||||
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
||||||
+ <CompileAsWinRT>false</CompileAsWinRT>
|
|
||||||
+ <SDLCheck>true</SDLCheck>
|
|
||||||
+ <PreprocessorDefinitions>COBJMACROS;CINTERFACE;WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=0;PA_USE_WASAPI=1;PA_USE_WDMKS=0;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ </ClCompile>
|
|
||||||
+ <Link>
|
|
||||||
+ <SubSystem>Console</SubSystem>
|
|
||||||
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
|
||||||
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
|
||||||
+ </Link>
|
|
||||||
+ </ItemDefinitionGroup>
|
|
||||||
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
+ <ClCompile>
|
|
||||||
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
||||||
+ <CompileAsWinRT>false</CompileAsWinRT>
|
|
||||||
+ <SDLCheck>true</SDLCheck>
|
|
||||||
+ <PreprocessorDefinitions>COBJMACROS;CINTERFACE;WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=0;PA_USE_WASAPI=1;PA_USE_WDMKS=0;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\include;$(ProjectDir)..\..\src\common;$(ProjectDir)..\..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
+ <ProgramDataBaseFileName>$(OutDir)\lib\x64\$(ProjectName).pdb</ProgramDataBaseFileName>
|
|
||||||
+ </ClCompile>
|
|
||||||
+ <Link>
|
|
||||||
+ <SubSystem>Console</SubSystem>
|
|
||||||
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
|
||||||
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
|
||||||
+ </Link>
|
|
||||||
+ <Lib>
|
|
||||||
+ <OutputFile>$(OutDir)\lib\x64\$(TargetName)$(TargetExt)</OutputFile>
|
|
||||||
+ <TargetMachine>MachineX64</TargetMachine>
|
|
||||||
+ </Lib>
|
|
||||||
+ <PostBuildEvent>
|
|
||||||
+ <Command>mkdir "$(OutDir)"include
|
|
||||||
+xcopy /S /Y $(ProjectDir)..\..\include\*.h "$(OutDir)"include
|
|
||||||
+del "$(OutDir)"portaudio_UWP.pri</Command>
|
|
||||||
+ </PostBuildEvent>
|
|
||||||
+ </ItemDefinitionGroup>
|
|
||||||
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
+ <ClCompile>
|
|
||||||
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
||||||
+ <CompileAsWinRT>false</CompileAsWinRT>
|
|
||||||
+ <SDLCheck>true</SDLCheck>
|
|
||||||
+ <PreprocessorDefinitions>COBJMACROS;CINTERFACE;WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=0;PA_USE_WASAPI=1;PA_USE_WDMKS=0;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <AdditionalIncludeDirectories>$(ProjectDir)..\..\include;$(ProjectDir)..\..\src\common;$(ProjectDir)..\..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
+ <DisableSpecificWarnings>4005;</DisableSpecificWarnings>
|
|
||||||
+ <ProgramDataBaseFileName>$(OutDir)\lib\x64\$(ProjectName).pdb</ProgramDataBaseFileName>
|
|
||||||
+ </ClCompile>
|
|
||||||
+ <Link>
|
|
||||||
+ <SubSystem>Console</SubSystem>
|
|
||||||
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
|
||||||
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
|
||||||
+ </Link>
|
|
||||||
+ <PostBuildEvent>
|
|
||||||
+ <Command>mkdir "$(OutDir)"include
|
|
||||||
+xcopy /S /Y $(ProjectDir)..\..\include\*.h "$(OutDir)"include
|
|
||||||
+del "$(OutDir)"portaudio_UWP.pri</Command>
|
|
||||||
+ </PostBuildEvent>
|
|
||||||
+ <Lib>
|
|
||||||
+ <OutputFile>$(OutDir)\lib\x64\$(TargetName)$(TargetExt)</OutputFile>
|
|
||||||
+ <TargetMachine>MachineX64</TargetMachine>
|
|
||||||
+ </Lib>
|
|
||||||
+ </ItemDefinitionGroup>
|
|
||||||
+ <ItemGroup>
|
|
||||||
+ <ClCompile Include="..\..\src\common\pa_allocation.c" />
|
|
||||||
+ <ClCompile Include="..\..\src\common\pa_converters.c" />
|
|
||||||
+ <ClCompile Include="..\..\src\common\pa_cpuload.c" />
|
|
||||||
+ <ClCompile Include="..\..\src\common\pa_debugprint.c" />
|
|
||||||
+ <ClCompile Include="..\..\src\common\pa_dither.c" />
|
|
||||||
+ <ClCompile Include="..\..\src\common\pa_front.c" />
|
|
||||||
+ <ClCompile Include="..\..\src\common\pa_process.c" />
|
|
||||||
+ <ClCompile Include="..\..\src\common\pa_ringbuffer.c" />
|
|
||||||
+ <ClCompile Include="..\..\src\common\pa_stream.c" />
|
|
||||||
+ <ClCompile Include="..\..\src\common\pa_trace.c" />
|
|
||||||
+ <ClCompile Include="..\..\src\hostapi\skeleton\pa_hostapi_skeleton.c" />
|
|
||||||
+ <ClCompile Include="..\..\src\hostapi\wasapi\pa_win_wasapi.c" />
|
|
||||||
+ <ClCompile Include="..\..\src\os\win\pa_win_coinitialize.c" />
|
|
||||||
+ <ClCompile Include="..\..\src\os\win\pa_win_hostapis.c" />
|
|
||||||
+ <ClCompile Include="..\..\src\os\win\pa_win_util.c" />
|
|
||||||
+ <ClCompile Include="..\..\src\os\win\pa_win_waveformat.c" />
|
|
||||||
+ <ClCompile Include="..\..\src\os\win\pa_win_wdmks_utils.c">
|
|
||||||
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
|
||||||
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
|
||||||
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
|
||||||
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
|
||||||
+ </ClCompile>
|
|
||||||
+ <ClCompile Include="..\..\src\os\win\pa_x86_plain_converters.c" />
|
|
||||||
+ </ItemGroup>
|
|
||||||
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
+ <ImportGroup Label="ExtensionTargets">
|
|
||||||
+ </ImportGroup>
|
|
||||||
+</Project>
|
|
||||||
\ No newline at end of file
|
|
||||||
--- a/src/hostapi/wasapi/pa_win_wasapi.c
|
|
||||||
+++ b/src/hostapi/wasapi/pa_win_wasapi.c
|
|
||||||
@@ -252,7 +252,7 @@ typedef struct _pa_AudioClientProperties {
|
|
||||||
#endif // __IAudioClient2_INTERFACE_DEFINED__
|
|
||||||
|
|
||||||
/* use CreateThread for CYGWIN/Windows Mobile, _beginthreadex for all others */
|
|
||||||
-#if !defined(__CYGWIN__) && !defined(_WIN32_WCE)
|
|
||||||
+#if !defined(__CYGWIN__) && !defined(_WIN32_WCE) && !defined(PA_WINRT)
|
|
||||||
#define CREATE_THREAD(PROC) (HANDLE)_beginthreadex( NULL, 0, (PROC), stream, 0, &stream->dwThreadId )
|
|
||||||
#define PA_THREAD_FUNC static unsigned WINAPI
|
|
||||||
#define PA_THREAD_ID unsigned
|
|
||||||
@@ -1355,14 +1355,18 @@ static HRESULT ActivateAudioInterface_WINRT(const PaWasapiDeviceInfo *deviceInfo
|
|
||||||
PaActivateAudioInterfaceCompletionHandler *handlerImpl = (PaActivateAudioInterfaceCompletionHandler *)handler;
|
|
||||||
OLECHAR devicePath[PA_WASAPI_DEVICE_PATH_LEN] = { 0 };
|
|
||||||
|
|
||||||
+ const GUID guid1 = { 0xe6327cad, 0xdcec, 0x4949, 0xae, 0x8a, 0x99, 0x1e, 0x97, 0x6a, 0x79, 0xd2 };
|
|
||||||
+ const GUID guid2 = { 0x2eef81be, 0x33fa, 0x4800, 0x96, 0x70, 0x1c, 0xd4, 0x74, 0x97, 0x2c, 0x3f };
|
|
||||||
// Get device path in form L"{DEVICE_GUID}"
|
|
||||||
switch (deviceInfo->flow)
|
|
||||||
{
|
|
||||||
case eRender:
|
|
||||||
- StringFromGUID2(&DEVINTERFACE_AUDIO_RENDER, devicePath, PA_WASAPI_DEVICE_PATH_LEN - 1);
|
|
||||||
+ //StringFromGUID2(&DEVINTERFACE_AUDIO_RENDER, devicePath, PA_WASAPI_DEVICE_PATH_LEN - 1);
|
|
||||||
+ StringFromGUID2(&guid1, devicePath, PA_WASAPI_DEVICE_PATH_LEN - 1);
|
|
||||||
break;
|
|
||||||
case eCapture:
|
|
||||||
- StringFromGUID2(&DEVINTERFACE_AUDIO_CAPTURE, devicePath, PA_WASAPI_DEVICE_PATH_LEN - 1);
|
|
||||||
+ //StringFromGUID2(&DEVINTERFACE_AUDIO_CAPTURE, devicePath, PA_WASAPI_DEVICE_PATH_LEN - 1);
|
|
||||||
+ StringFromGUID2(&guid2, devicePath, PA_WASAPI_DEVICE_PATH_LEN - 1);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return S_FALSE;
|
|
||||||
@@ -1404,15 +1408,6 @@ static HRESULT ActivateAudioInterface(const PaWasapiDeviceInfo *deviceInfo, IAud
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
-#ifdef PA_WINRT
|
|
||||||
-static DWORD SignalObjectAndWait(HANDLE hObjectToSignal, HANDLE hObjectToWaitOn, DWORD dwMilliseconds, BOOL bAlertable)
|
|
||||||
-{
|
|
||||||
- SetEvent(hObjectToSignal);
|
|
||||||
- return WaitForSingleObjectEx(hObjectToWaitOn, dwMilliseconds, bAlertable);
|
|
||||||
-}
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
-// ------------------------------------------------------------------------------------------
|
|
||||||
PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
|
|
||||||
{
|
|
||||||
PaError result = paNoError;
|
|
||||||
--
|
|
||||||
2.10.2.windows.1
|
|
||||||
|
|
@ -1,349 +0,0 @@
|
|||||||
--- /dev/null
|
|
||||||
+++ b/MSVC/portaudio.vcxproj
|
|
||||||
@@ -0,0 +1,342 @@
|
|
||||||
+<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
+ <ItemGroup Label="ProjectConfigurations">
|
|
||||||
+ <ProjectConfiguration Include="Debug|Win32">
|
|
||||||
+ <Configuration>Debug</Configuration>
|
|
||||||
+ <Platform>Win32</Platform>
|
|
||||||
+ </ProjectConfiguration>
|
|
||||||
+ <ProjectConfiguration Include="Debug|x64">
|
|
||||||
+ <Configuration>Debug</Configuration>
|
|
||||||
+ <Platform>x64</Platform>
|
|
||||||
+ </ProjectConfiguration>
|
|
||||||
+ <ProjectConfiguration Include="Release|Win32">
|
|
||||||
+ <Configuration>Release</Configuration>
|
|
||||||
+ <Platform>Win32</Platform>
|
|
||||||
+ </ProjectConfiguration>
|
|
||||||
+ <ProjectConfiguration Include="Release|x64">
|
|
||||||
+ <Configuration>Release</Configuration>
|
|
||||||
+ <Platform>x64</Platform>
|
|
||||||
+ </ProjectConfiguration>
|
|
||||||
+ </ItemGroup>
|
|
||||||
+ <PropertyGroup Label="Globals">
|
|
||||||
+ <ProjectGuid>{0A18A071-125E-442F-AFF7-A3F68ABECF99}</ProjectGuid>
|
|
||||||
+ <RootNamespace>portaudio</RootNamespace>
|
|
||||||
+ <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
+ <ConfigurationType>StaticLibrary</ConfigurationType>
|
|
||||||
+ <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
|
||||||
+ <UseOfMfc>false</UseOfMfc><CharacterSet>Unicode</CharacterSet>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
+ <ConfigurationType>StaticLibrary</ConfigurationType>
|
|
||||||
+ <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
|
||||||
+ <UseOfMfc>false</UseOfMfc><CharacterSet>Unicode</CharacterSet>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
+ <ConfigurationType>StaticLibrary</ConfigurationType>
|
|
||||||
+ <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
|
||||||
+ <UseOfMfc>false</UseOfMfc><CharacterSet>Unicode</CharacterSet>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
+ <ConfigurationType>StaticLibrary</ConfigurationType>
|
|
||||||
+ <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
|
||||||
+ <UseOfMfc>false</UseOfMfc><CharacterSet>Unicode</CharacterSet>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
+ <ImportGroup Label="ExtensionSettings">
|
|
||||||
+ </ImportGroup>
|
|
||||||
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
|
||||||
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
|
||||||
+ </ImportGroup>
|
|
||||||
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
|
||||||
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
|
||||||
+ </ImportGroup>
|
|
||||||
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
|
||||||
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
|
||||||
+ </ImportGroup>
|
|
||||||
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
|
||||||
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
|
||||||
+ </ImportGroup>
|
|
||||||
+ <PropertyGroup Label="UserMacros" />
|
|
||||||
+ <PropertyGroup>
|
|
||||||
+ <_ProjectFileVersion>14.0.25123.0</_ProjectFileVersion>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
+ <OutDir>$(ProjectDir)..\..\..\msvc\</OutDir>
|
|
||||||
+ <IntDir>$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
+ <LinkIncremental>false</LinkIncremental>
|
|
||||||
+ <TargetExt>.lib</TargetExt>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
+ <OutDir>$(ProjectDir)..\..\..\msvc\</OutDir>
|
|
||||||
+ <IntDir>$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
+ <LinkIncremental>false</LinkIncremental>
|
|
||||||
+ <TargetExt>.lib</TargetExt>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
+ <OutDir>$(ProjectDir)..\..\..\msvc\</OutDir>
|
|
||||||
+ <IntDir>$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
+ <LinkIncremental>true</LinkIncremental>
|
|
||||||
+ <TargetExt>.lib</TargetExt>
|
|
||||||
+ <TargetName>$(ProjectName)d</TargetName>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
+ <OutDir>$(ProjectDir)..\..\..\msvc\</OutDir>
|
|
||||||
+ <IntDir>$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
+ <LinkIncremental>true</LinkIncremental>
|
|
||||||
+ <TargetExt>.lib</TargetExt>
|
|
||||||
+ <TargetName>$(ProjectName)d</TargetName>
|
|
||||||
+ </PropertyGroup>
|
|
||||||
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
+ <Midl>
|
|
||||||
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <MkTypLibCompatible>true</MkTypLibCompatible>
|
|
||||||
+ <SuppressStartupBanner>true</SuppressStartupBanner>
|
|
||||||
+ <TargetEnvironment>Win32</TargetEnvironment>
|
|
||||||
+ <TypeLibraryName>.\Release_x86/portaudio.tlb</TypeLibraryName>
|
|
||||||
+ <HeaderFileName>
|
|
||||||
+ </HeaderFileName>
|
|
||||||
+ </Midl>
|
|
||||||
+ <ClCompile>
|
|
||||||
+ <Optimization>MaxSpeed</Optimization>
|
|
||||||
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
|
||||||
+ <IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
|
||||||
+ <AdditionalIncludeDirectories>..\src\common;..\include;.\;..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
+ <PreprocessorDefinitions>PA_WDMKS_NO_KSGUID_LIB;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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <StringPooling>true</StringPooling>
|
|
||||||
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
|
||||||
+ <FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
+ <PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)/portaudio.pch</PrecompiledHeaderOutputFile>
|
|
||||||
+ <AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation>
|
|
||||||
+ <ObjectFileName>$(Platform)\$(Configuration)\</ObjectFileName>
|
|
||||||
+ <ProgramDataBaseFileName>$(OutDir)\lib\x86\$(TargetName).pdb</ProgramDataBaseFileName>
|
|
||||||
+ <WarningLevel>Level3</WarningLevel>
|
|
||||||
+ <SuppressStartupBanner>true</SuppressStartupBanner>
|
|
||||||
+ </ClCompile>
|
|
||||||
+ <ResourceCompile>
|
|
||||||
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <Culture>0x0409</Culture>
|
|
||||||
+ </ResourceCompile>
|
|
||||||
+ <Link>
|
|
||||||
+ <AdditionalDependencies>ksuser.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
+ <OutputFile>$(Platform)\$(Configuration)\portaudio_x86.dll</OutputFile>
|
|
||||||
+ <SuppressStartupBanner>true</SuppressStartupBanner>
|
|
||||||
+ <ModuleDefinitionFile>.\portaudio.def</ModuleDefinitionFile>
|
|
||||||
+ <ProgramDatabaseFile>$(Platform)\$(Configuration)\portaudio_x86.pdb</ProgramDatabaseFile>
|
|
||||||
+ <ImportLibrary>$(Platform)\$(Configuration)\portaudio_x86.lib</ImportLibrary>
|
|
||||||
+ <TargetMachine>MachineX86</TargetMachine>
|
|
||||||
+ </Link>
|
|
||||||
+ <Bscmake>
|
|
||||||
+ <SuppressStartupBanner>true</SuppressStartupBanner>
|
|
||||||
+ <OutputFile>$(Platform)\$(Configuration)\portaudio.bsc</OutputFile>
|
|
||||||
+ </Bscmake>
|
|
||||||
+ <PostBuildEvent>
|
|
||||||
+ <Command>mkdir "$(OutDir)"include
|
|
||||||
+xcopy /S /Y $(ProjectDir)..\include\*.h "$(OutDir)"include</Command>
|
|
||||||
+ </PostBuildEvent>
|
|
||||||
+ <Lib>
|
|
||||||
+ <OutputFile>$(OutDir)\lib\x86\$(TargetName)$(TargetExt)</OutputFile>
|
|
||||||
+ </Lib>
|
|
||||||
+ </ItemDefinitionGroup>
|
|
||||||
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
+ <Midl>
|
|
||||||
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <MkTypLibCompatible>true</MkTypLibCompatible>
|
|
||||||
+ <SuppressStartupBanner>true</SuppressStartupBanner>
|
|
||||||
+ <TargetEnvironment>X64</TargetEnvironment>
|
|
||||||
+ <TypeLibraryName>.\Release_x86/portaudio.tlb</TypeLibraryName>
|
|
||||||
+ <HeaderFileName>
|
|
||||||
+ </HeaderFileName>
|
|
||||||
+ </Midl>
|
|
||||||
+ <ClCompile>
|
|
||||||
+ <Optimization>MaxSpeed</Optimization>
|
|
||||||
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
|
||||||
+ <IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
|
||||||
+ <AdditionalIncludeDirectories>..\src\common;..\include;.\;..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
+ <PreprocessorDefinitions>PA_WDMKS_NO_KSGUID_LIB;_WIN64;NDEBUG;_USRDLL;_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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <StringPooling>true</StringPooling>
|
|
||||||
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
|
||||||
+ <FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
+ <PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)\portaudio.pch</PrecompiledHeaderOutputFile>
|
|
||||||
+ <AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation>
|
|
||||||
+ <ObjectFileName>$(Platform)\$(Configuration)\</ObjectFileName>
|
|
||||||
+ <ProgramDataBaseFileName>$(OutDir)\lib\x64\$(TargetName).pdb</ProgramDataBaseFileName>
|
|
||||||
+ <WarningLevel>Level3</WarningLevel>
|
|
||||||
+ <SuppressStartupBanner>true</SuppressStartupBanner>
|
|
||||||
+ </ClCompile>
|
|
||||||
+ <ResourceCompile>
|
|
||||||
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <Culture>0x0409</Culture>
|
|
||||||
+ </ResourceCompile>
|
|
||||||
+ <Link>
|
|
||||||
+ <AdditionalDependencies>ksuser.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
+ <OutputFile>$(Platform)\$(Configuration)\portaudio_x64.dll</OutputFile>
|
|
||||||
+ <SuppressStartupBanner>true</SuppressStartupBanner>
|
|
||||||
+ <ModuleDefinitionFile>.\portaudio.def</ModuleDefinitionFile>
|
|
||||||
+ <ProgramDatabaseFile>$(Platform)\$(Configuration)/portaudio_x64.pdb</ProgramDatabaseFile>
|
|
||||||
+ <ImportLibrary>$(Platform)\$(Configuration)/portaudio_x64.lib</ImportLibrary>
|
|
||||||
+ <TargetMachine>MachineX64</TargetMachine>
|
|
||||||
+ </Link>
|
|
||||||
+ <Bscmake>
|
|
||||||
+ <SuppressStartupBanner>true</SuppressStartupBanner>
|
|
||||||
+ <OutputFile>$(Platform)\$(Configuration)\portaudio_x64.bsc</OutputFile>
|
|
||||||
+ </Bscmake>
|
|
||||||
+ <PostBuildEvent>
|
|
||||||
+ <Command>mkdir "$(OutDir)"include
|
|
||||||
+xcopy /S /Y $(ProjectDir)..\include\*.h "$(OutDir)"include</Command>
|
|
||||||
+ </PostBuildEvent>
|
|
||||||
+ <Lib>
|
|
||||||
+ <OutputFile>$(OutDir)\lib\x64\$(TargetName)$(TargetExt)</OutputFile>
|
|
||||||
+ </Lib>
|
|
||||||
+ </ItemDefinitionGroup>
|
|
||||||
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
+ <Midl>
|
|
||||||
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <MkTypLibCompatible>true</MkTypLibCompatible>
|
|
||||||
+ <SuppressStartupBanner>true</SuppressStartupBanner>
|
|
||||||
+ <TargetEnvironment>Win32</TargetEnvironment>
|
|
||||||
+ <TypeLibraryName>.\Debug_x86/portaudio.tlb</TypeLibraryName>
|
|
||||||
+ <HeaderFileName>
|
|
||||||
+ </HeaderFileName>
|
|
||||||
+ </Midl>
|
|
||||||
+ <ClCompile>
|
|
||||||
+ <Optimization>Disabled</Optimization>
|
|
||||||
+ <AdditionalIncludeDirectories>..\src\common;..\include;.\;..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
+ <PreprocessorDefinitions>PA_WDMKS_NO_KSGUID_LIB;WIN32;_DEBUG;_USRDLL;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=1;PA_USE_WMME=0;PA_USE_WASAPI=0;PA_USE_WDMKS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <MinimalRebuild>true</MinimalRebuild>
|
|
||||||
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
|
||||||
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
|
||||||
+ <PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)/portaudio.pch</PrecompiledHeaderOutputFile>
|
|
||||||
+ <AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation>
|
|
||||||
+ <ObjectFileName>$(Platform)\$(Configuration)\</ObjectFileName>
|
|
||||||
+ <ProgramDataBaseFileName>$(OutDir)\lib\x86\$(TargetName).pdb</ProgramDataBaseFileName>
|
|
||||||
+ <WarningLevel>Level3</WarningLevel>
|
|
||||||
+ <SuppressStartupBanner>true</SuppressStartupBanner>
|
|
||||||
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
|
||||||
+ <DisableSpecificWarnings>4996;</DisableSpecificWarnings>
|
|
||||||
+ </ClCompile>
|
|
||||||
+ <ResourceCompile>
|
|
||||||
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <Culture>0x0409</Culture>
|
|
||||||
+ </ResourceCompile>
|
|
||||||
+ <Link>
|
|
||||||
+ <AdditionalDependencies>ksguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
+ <OutputFile>$(Platform)\$(Configuration)\portaudio_x86.dll</OutputFile>
|
|
||||||
+ <SuppressStartupBanner>true</SuppressStartupBanner>
|
|
||||||
+ <ModuleDefinitionFile>.\portaudio.def</ModuleDefinitionFile>
|
|
||||||
+ <GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
+ <ProgramDatabaseFile>$(Platform)\$(Configuration)\portaudio_x86.pdb</ProgramDatabaseFile>
|
|
||||||
+ <ImportLibrary>$(Platform)\$(Configuration)\portaudio_x86.lib</ImportLibrary>
|
|
||||||
+ <TargetMachine>MachineX86</TargetMachine>
|
|
||||||
+ </Link>
|
|
||||||
+ <Bscmake>
|
|
||||||
+ <SuppressStartupBanner>true</SuppressStartupBanner>
|
|
||||||
+ <OutputFile>$(Platform)\$(Configuration)\portaudio.bsc</OutputFile>
|
|
||||||
+ </Bscmake>
|
|
||||||
+ <PostBuildEvent>
|
|
||||||
+ <Command>mkdir "$(OutDir)"include
|
|
||||||
+xcopy /S /Y $(ProjectDir)..\include\*.h "$(OutDir)"include</Command>
|
|
||||||
+ </PostBuildEvent>
|
|
||||||
+ <Lib>
|
|
||||||
+ <OutputFile>$(OutDir)\lib\x86\$(TargetName)$(TargetExt)</OutputFile>
|
|
||||||
+ </Lib>
|
|
||||||
+ </ItemDefinitionGroup>
|
|
||||||
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
+ <Midl>
|
|
||||||
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <MkTypLibCompatible>true</MkTypLibCompatible>
|
|
||||||
+ <SuppressStartupBanner>true</SuppressStartupBanner>
|
|
||||||
+ <TargetEnvironment>X64</TargetEnvironment>
|
|
||||||
+ <TypeLibraryName>.\Debug_x86/portaudio.tlb</TypeLibraryName>
|
|
||||||
+ <HeaderFileName>
|
|
||||||
+ </HeaderFileName>
|
|
||||||
+ </Midl>
|
|
||||||
+ <ClCompile>
|
|
||||||
+ <Optimization>Disabled</Optimization>
|
|
||||||
+ <AdditionalIncludeDirectories>..\src\common;..\include;.\;..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
+ <PreprocessorDefinitions>PA_WDMKS_NO_KSGUID_LIB;_WIN64;_DEBUG;_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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <MinimalRebuild>true</MinimalRebuild>
|
|
||||||
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
|
||||||
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
|
||||||
+ <PrecompiledHeaderOutputFile>$(Platform)\$(Configuration)\portaudio.pch</PrecompiledHeaderOutputFile>
|
|
||||||
+ <AssemblerListingLocation>$(Platform)\$(Configuration)\</AssemblerListingLocation>
|
|
||||||
+ <ObjectFileName>$(Platform)\$(Configuration)\</ObjectFileName>
|
|
||||||
+ <ProgramDataBaseFileName>$(OutDir)\lib\x64\$(TargetName).pdb</ProgramDataBaseFileName>
|
|
||||||
+ <WarningLevel>Level3</WarningLevel>
|
|
||||||
+ <SuppressStartupBanner>true</SuppressStartupBanner>
|
|
||||||
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
|
||||||
+ </ClCompile>
|
|
||||||
+ <ResourceCompile>
|
|
||||||
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
+ <Culture>0x0409</Culture>
|
|
||||||
+ </ResourceCompile>
|
|
||||||
+ <Link>
|
|
||||||
+ <AdditionalDependencies>ksguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
+ <OutputFile>$(Platform)\$(Configuration)\portaudio_x64.dll</OutputFile>
|
|
||||||
+ <SuppressStartupBanner>true</SuppressStartupBanner>
|
|
||||||
+ <ModuleDefinitionFile>.\portaudio.def</ModuleDefinitionFile>
|
|
||||||
+ <GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
+ <ProgramDatabaseFile>$(Platform)\$(Configuration)/portaudio_x64.pdb</ProgramDatabaseFile>
|
|
||||||
+ <ImportLibrary>$(Platform)\$(Configuration)\portaudio_x64.lib</ImportLibrary>
|
|
||||||
+ <TargetMachine>MachineX64</TargetMachine>
|
|
||||||
+ </Link>
|
|
||||||
+ <Bscmake>
|
|
||||||
+ <SuppressStartupBanner>true</SuppressStartupBanner>
|
|
||||||
+ <OutputFile>$(Platform)\$(Configuration)/portaudio_x64.bsc</OutputFile>
|
|
||||||
+ </Bscmake>
|
|
||||||
+ <Lib>
|
|
||||||
+ <OutputFile>$(OutDir)\lib\x64\$(TargetName)$(TargetExt)</OutputFile>
|
|
||||||
+ </Lib>
|
|
||||||
+ <PostBuildEvent>
|
|
||||||
+ <Command>mkdir "$(OutDir)"include
|
|
||||||
+xcopy /S /Y $(ProjectDir)..\include\*.h "$(OutDir)"include</Command>
|
|
||||||
+ </PostBuildEvent>
|
|
||||||
+ </ItemDefinitionGroup>
|
|
||||||
+ <ItemGroup>
|
|
||||||
+ <ClCompile Include="..\src\common\pa_allocation.c" />
|
|
||||||
+ <ClCompile Include="..\src\common\pa_converters.c" />
|
|
||||||
+ <ClCompile Include="..\src\common\pa_cpuload.c" />
|
|
||||||
+ <ClCompile Include="..\src\common\pa_debugprint.c" />
|
|
||||||
+ <ClCompile Include="..\src\common\pa_dither.c" />
|
|
||||||
+ <ClCompile Include="..\src\common\pa_front.c" />
|
|
||||||
+ <ClCompile Include="..\src\common\pa_process.c" />
|
|
||||||
+ <ClCompile Include="..\src\common\pa_ringbuffer.c" />
|
|
||||||
+ <ClCompile Include="..\src\common\pa_stream.c" />
|
|
||||||
+ <ClCompile Include="..\src\common\pa_trace.c" />
|
|
||||||
+ <ClCompile Include="..\src\hostapi\dsound\pa_win_ds.c" />
|
|
||||||
+ <ClCompile Include="..\src\hostapi\dsound\pa_win_ds_dynlink.c" />
|
|
||||||
+ <ClCompile Include="..\src\hostapi\skeleton\pa_hostapi_skeleton.c" />
|
|
||||||
+ <ClCompile Include="..\src\hostapi\wasapi\pa_win_wasapi.c" />
|
|
||||||
+ <ClCompile Include="..\src\hostapi\wdmks\pa_win_wdmks.c" />
|
|
||||||
+ <ClCompile Include="..\src\hostapi\wmme\pa_win_wmme.c" />
|
|
||||||
+ <ClCompile Include="..\src\os\win\pa_win_coinitialize.c" />
|
|
||||||
+ <ClCompile Include="..\src\os\win\pa_win_hostapis.c" />
|
|
||||||
+ <ClCompile Include="..\src\os\win\pa_win_util.c" />
|
|
||||||
+ <ClCompile Include="..\src\os\win\pa_win_waveformat.c" />
|
|
||||||
+ <ClCompile Include="..\src\os\win\pa_win_wdmks_utils.c" />
|
|
||||||
+ <ClCompile Include="..\src\os\win\pa_x86_plain_converters.c" />
|
|
||||||
+ </ItemGroup>
|
|
||||||
+ <ItemGroup>
|
|
||||||
+ <None Include="portaudio.def" />
|
|
||||||
+ </ItemGroup>
|
|
||||||
+ <ItemGroup>
|
|
||||||
+ <ClInclude Include="..\include\pa_asio.h" />
|
|
||||||
+ <ClInclude Include="..\include\pa_win_ds.h" />
|
|
||||||
+ <ClInclude Include="..\include\pa_win_wasapi.h" />
|
|
||||||
+ <ClInclude Include="..\include\pa_win_waveformat.h" />
|
|
||||||
+ <ClInclude Include="..\include\pa_win_wmme.h" />
|
|
||||||
+ <ClInclude Include="..\include\portaudio.h" />
|
|
||||||
+ <ClInclude Include="..\src\common\pa_gitrevision.h" />
|
|
||||||
+ </ItemGroup>
|
|
||||||
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
+ <ImportGroup Label="ExtensionTargets">
|
|
||||||
+ </ImportGroup>
|
|
||||||
+</Project>
|
|
||||||
\ No newline at end of file
|
|
||||||
--
|
|
||||||
2.10.2.windows.1
|
|
||||||
|
|
@ -2,18 +2,12 @@
|
|||||||
"name": "portaudio",
|
"name": "portaudio",
|
||||||
"version": "v190600_20161030",
|
"version": "v190600_20161030",
|
||||||
"url": "http://www.portaudio.com/archives/pa_stable___VERSION__.tgz",
|
"url": "http://www.portaudio.com/archives/pa_stable___VERSION__.tgz",
|
||||||
"deps": [],
|
"use_cmake" : true,
|
||||||
"patches": [],
|
"defines": [
|
||||||
"win_patches": [
|
"MSVS=1",
|
||||||
"pa-vs2017.patch",
|
"PA_USE_ASIO=0",
|
||||||
"pa-dsound-aecns.patch",
|
"PA_USE_DS=0",
|
||||||
"pa-dsound.patch"
|
"PA_USE_WMME=0",
|
||||||
],
|
"PA_USE_WDMKS=0"
|
||||||
"project_paths": ["MSVC/portaudio.vcxproj"],
|
]
|
||||||
"with_env" : "",
|
|
||||||
"custom_scripts": {
|
|
||||||
"pre_build": [],
|
|
||||||
"build": [],
|
|
||||||
"post_build": []
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -48,6 +48,7 @@ struct PortAudioLayer::PortAudioLayerImpl
|
|||||||
bool initInputStream(PortAudioLayer&);
|
bool initInputStream(PortAudioLayer&);
|
||||||
bool initOutputStream(PortAudioLayer&);
|
bool initOutputStream(PortAudioLayer&);
|
||||||
bool initFullDuplexStream(PortAudioLayer&);
|
bool initFullDuplexStream(PortAudioLayer&);
|
||||||
|
bool apiInitialised_ {false};
|
||||||
|
|
||||||
std::vector<std::string> getDeviceByType(AudioDeviceType type) const;
|
std::vector<std::string> getDeviceByType(AudioDeviceType type) const;
|
||||||
int getIndexByType(AudioDeviceType type);
|
int getIndexByType(AudioDeviceType type);
|
||||||
@ -173,6 +174,11 @@ PortAudioLayer::getIndexRingtone() const
|
|||||||
void
|
void
|
||||||
PortAudioLayer::startStream(AudioDeviceType stream)
|
PortAudioLayer::startStream(AudioDeviceType stream)
|
||||||
{
|
{
|
||||||
|
if (!pimpl_->apiInitialised_) {
|
||||||
|
JAMI_WARN("PortAudioLayer API not initialised");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto startPlayback = [this](bool fullDuplexMode = false) -> bool {
|
auto startPlayback = [this](bool fullDuplexMode = false) -> bool {
|
||||||
std::unique_lock<std::mutex> lock(mutex_);
|
std::unique_lock<std::mutex> lock(mutex_);
|
||||||
if (status_.load() != Status::Idle)
|
if (status_.load() != Status::Idle)
|
||||||
@ -407,21 +413,23 @@ PortAudioLayer::PortAudioLayerImpl::getDeviceByType(AudioDeviceType type) const
|
|||||||
void
|
void
|
||||||
PortAudioLayer::PortAudioLayerImpl::init(PortAudioLayer& parent)
|
PortAudioLayer::PortAudioLayerImpl::init(PortAudioLayer& parent)
|
||||||
{
|
{
|
||||||
JAMI_DBG("Init PortAudioLayer");
|
JAMI_DBG("PortAudioLayer Init");
|
||||||
const auto err = Pa_Initialize();
|
const auto err = Pa_Initialize();
|
||||||
if (err != paNoError) {
|
auto apiIndex = Pa_GetDefaultHostApi();
|
||||||
|
auto apiInfo = Pa_GetHostApiInfo(apiIndex);
|
||||||
|
if (err != paNoError || apiInfo == nullptr) {
|
||||||
JAMI_ERR("PortAudioLayer error : %s", Pa_GetErrorText(err));
|
JAMI_ERR("PortAudioLayer error : %s", Pa_GetErrorText(err));
|
||||||
terminate();
|
terminate();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apiInitialised_ = true;
|
||||||
|
JAMI_DBG() << "Portaudio initialized using: " << apiInfo->name;
|
||||||
|
|
||||||
initInput(parent);
|
initInput(parent);
|
||||||
initOutput(parent);
|
initOutput(parent);
|
||||||
|
|
||||||
std::fill(std::begin(streams_), std::end(streams_), nullptr);
|
std::fill(std::begin(streams_), std::end(streams_), nullptr);
|
||||||
|
|
||||||
auto apiIndex = Pa_GetDefaultHostApi();
|
|
||||||
auto apiInfo = Pa_GetHostApiInfo(apiIndex);
|
|
||||||
JAMI_DBG() << "Portaudio initialized using: " << apiInfo->name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Reference in New Issue
Block a user