mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Externals: remove PortAudio
This commit is contained in:
@@ -491,32 +491,6 @@ if(ENCODE_FRAMEDUMPS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ANDROID)
|
||||
set(PORTAUDIO_FOUND TRUE)
|
||||
add_definitions(-DHAVE_PORTAUDIO=1)
|
||||
|
||||
if(NOT APPLE)
|
||||
set(CMAKE_REQUIRED_LIBRARIES portaudio)
|
||||
CHECK_CXX_SOURCE_RUNS(
|
||||
"#include <portaudio.h>
|
||||
int main(int argc, char **argv)
|
||||
{ if(Pa_GetVersion() >= 1890) return 0; else return 1; }"
|
||||
SYSTEM_PORTAUDIO)
|
||||
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||
endif()
|
||||
if(SYSTEM_PORTAUDIO AND NOT APPLE)
|
||||
message(STATUS "Using shared PortAudio for mic support")
|
||||
set(PORTAUDIO_LIBRARIES portaudio)
|
||||
else()
|
||||
message(STATUS "Using static PortAudio from Externals for mic support")
|
||||
option(PA_USE_ASIO "Enable PortAudio support for ASIO" OFF)
|
||||
option(PA_USE_DS "Enable PortAudio support for DirectSound" OFF)
|
||||
option(PA_USE_WDMKS "Enable PortAudio support for WDMKS" OFF)
|
||||
add_subdirectory(Externals/portaudio EXCLUDE_FROM_ALL)
|
||||
set(PORTAUDIO_LIBRARIES portaudio_static)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(OPROFILING)
|
||||
find_package(OProfile)
|
||||
if(OPROFILE_FOUND)
|
||||
|
||||
Vendored
-2
@@ -46,8 +46,6 @@ Dolphin includes or links code of the following third-party software projects:
|
||||
[GPLv2](http://pearpc.cvs.sourceforge.net/viewvc/pearpc/pearpc/COPYING?view=markup) (with permission by the author to license under GPLv2+)
|
||||
- [mbed TLS](https://tls.mbed.org/):
|
||||
[Apache 2.0](https://github.com/ARMmbed/mbedtls/blob/development/LICENSE)
|
||||
- [PortAudio](http://www.portaudio.com/):
|
||||
[MIT](http://www.portaudio.com/license.html)
|
||||
- [PulseAudio](http://www.freedesktop.org/wiki/Software/PulseAudio/):
|
||||
[LGPLv2.1+](http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/LICENSE)
|
||||
- [Qt5](http://qt-project.org/):
|
||||
|
||||
Vendored
-409
@@ -1,409 +0,0 @@
|
||||
# $Id: $
|
||||
#
|
||||
# For a "How-To" please refer to the Portaudio documentation at:
|
||||
# http://www.portaudio.com/trac/wiki/TutorialDir/Compile/CMake
|
||||
#
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
|
||||
# Check if the user is building PortAudio stand-alone or as part of a larger
|
||||
# project. If this is part of a larger project (i.e. the CMakeLists.txt has
|
||||
# been imported by some other CMakeLists.txt), we don't want to trump over
|
||||
# the top of that project's global settings.
|
||||
IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_LIST_DIR})
|
||||
IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
MESSAGE(STATUS "Setting CMAKE_BUILD_TYPE type to 'Debug' as none was specified.")
|
||||
SET(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
|
||||
SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
|
||||
ENDIF()
|
||||
|
||||
PROJECT(portaudio)
|
||||
|
||||
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
IF(WIN32 AND MSVC)
|
||||
OPTION(PA_DLL_LINK_WITH_STATIC_RUNTIME "Link with static runtime libraries (minimizes runtime dependencies)" ON)
|
||||
IF(PA_DLL_LINK_WITH_STATIC_RUNTIME)
|
||||
FOREACH(flag_var
|
||||
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
|
||||
IF(${flag_var} MATCHES "/MD")
|
||||
STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
SET(PA_PKGCONFIG_VERSION 19)
|
||||
|
||||
# Most of the code from this point onwards is related to populating the
|
||||
# following variables:
|
||||
# PA_PUBLIC_INCLUDES - This contains the list of public PortAudio header
|
||||
# files. These files will be copied into /include paths on Unix'y
|
||||
# systems when "make install" is invoked.
|
||||
# PA_PRIVATE_INCLUDES - This contains the list of header files which
|
||||
# are not part of PortAudio, but are required by the various hostapis.
|
||||
# It is only used by CMake IDE generators (like Visual Studio) to
|
||||
# provide quick-links to useful headers. It has no impact on build
|
||||
# output.
|
||||
# PA_PRIVATE_INCLUDE_PATHS - This contains the list of include paths which
|
||||
# will be passed to the compiler while PortAudio is being built which
|
||||
# are not required by applications using the PortAudio API.
|
||||
# PA_PRIVATE_COMPILE_DEFINITIONS - This contains a list of preprocessor
|
||||
# macro definitions which will be set when compiling PortAudio source
|
||||
# files.
|
||||
# PA_SOURCES - This contains the list of source files which will be built
|
||||
# into the static and shared PortAudio libraries.
|
||||
# PA_NON_UNICODE_SOURCES - This also contains a list of source files which
|
||||
# will be build into the static and shared PortAudio libraries. However,
|
||||
# these sources will not have any unicode compiler definitions added
|
||||
# to them. This list should only contain external source dependencies.
|
||||
# PA_EXTRA_SHARED_SOURCES - Contains a list of extra files which will be
|
||||
# associated only with the shared PortAudio library. This only seems
|
||||
# relevant for Windows shared libraries which require a list of export
|
||||
# symbols.
|
||||
# Where other PA_* variables are set, these are almost always only used to
|
||||
# preserve the historic SOURCE_GROUP behavior (which again only has an impact
|
||||
# on IDE-style generators for visual appearance) or store the output of
|
||||
# find_library() calls.
|
||||
|
||||
SET(PA_COMMON_INCLUDES
|
||||
src/common/pa_allocation.h
|
||||
src/common/pa_converters.h
|
||||
src/common/pa_cpuload.h
|
||||
src/common/pa_debugprint.h
|
||||
src/common/pa_dither.h
|
||||
src/common/pa_endianness.h
|
||||
src/common/pa_hostapi.h
|
||||
src/common/pa_memorybarrier.h
|
||||
src/common/pa_process.h
|
||||
src/common/pa_ringbuffer.h
|
||||
src/common/pa_stream.h
|
||||
src/common/pa_trace.h
|
||||
src/common/pa_types.h
|
||||
src/common/pa_util.h
|
||||
)
|
||||
|
||||
SET(PA_COMMON_SOURCES
|
||||
src/common/pa_allocation.c
|
||||
src/common/pa_converters.c
|
||||
src/common/pa_cpuload.c
|
||||
src/common/pa_debugprint.c
|
||||
src/common/pa_dither.c
|
||||
src/common/pa_front.c
|
||||
src/common/pa_process.c
|
||||
src/common/pa_ringbuffer.c
|
||||
src/common/pa_stream.c
|
||||
src/common/pa_trace.c
|
||||
)
|
||||
|
||||
SOURCE_GROUP("common" FILES ${PA_COMMON_INCLUDES} ${PA_COMMON_SOURCES})
|
||||
|
||||
SET(PA_PUBLIC_INCLUDES include/portaudio.h)
|
||||
|
||||
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake_support)
|
||||
|
||||
SET(PA_SKELETON_SOURCES src/hostapi/skeleton/pa_hostapi_skeleton.c)
|
||||
SOURCE_GROUP("hostapi\\skeleton" ${PA_SKELETON_SOURCES})
|
||||
SET(PA_SOURCES ${PA_COMMON_SOURCES} ${PA_SKELETON_SOURCES})
|
||||
SET(PA_PRIVATE_INCLUDE_PATHS src/common ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
IF(WIN32)
|
||||
SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} _CRT_SECURE_NO_WARNINGS)
|
||||
|
||||
SET(PA_PLATFORM_SOURCES
|
||||
src/os/win/pa_win_hostapis.c
|
||||
src/os/win/pa_win_util.c
|
||||
src/os/win/pa_win_waveformat.c
|
||||
src/os/win/pa_win_wdmks_utils.c
|
||||
src/os/win/pa_win_coinitialize.c)
|
||||
SET(PA_PLATFORM_INCLUDES
|
||||
src/os/win/pa_win_coinitialize.h
|
||||
src/os/win/pa_win_wdmks_utils.h)
|
||||
|
||||
IF(MSVC)
|
||||
SET(PA_PLATFORM_SOURCES ${PA_PLATFORM_SOURCES} src/os/win/pa_x86_plain_converters.c)
|
||||
SET(PA_PLATFORM_INCLUDES ${PA_PLATFORM_INCLUDES} src/os/win/pa_x86_plain_converters.h)
|
||||
ELSE()
|
||||
SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} _WIN32_WINNT=0x0501 WINVER=0x0501)
|
||||
SET(DEF_EXCLUDE_X86_PLAIN_CONVERTERS ";")
|
||||
ENDIF()
|
||||
|
||||
SOURCE_GROUP("os\\win" FILES ${PA_PLATFORM_SOURCES} ${PA_PLATFORM_INCLUDES})
|
||||
SET(PA_SOURCES ${PA_SOURCES} ${PA_PLATFORM_SOURCES})
|
||||
SET(PA_PRIVATE_INCLUDES ${PA_PRIVATE_INCLUDES} ${PA_PLATFORM_INCLUDES})
|
||||
SET(PA_PRIVATE_INCLUDE_PATHS ${PA_PRIVATE_INCLUDE_PATHS} src/os/win)
|
||||
|
||||
SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} winmm)
|
||||
|
||||
# Try to find ASIO SDK (assumes that portaudio and asiosdk folders are side-by-side, see
|
||||
# http://www.portaudio.com/trac/wiki/TutorialDir/Compile/WindowsASIOMSVC)
|
||||
FIND_PACKAGE(ASIOSDK)
|
||||
IF(ASIOSDK_FOUND)
|
||||
OPTION(PA_USE_ASIO "Enable support for ASIO" ON)
|
||||
ELSE()
|
||||
OPTION(PA_USE_ASIO "Enable support for ASIO" OFF)
|
||||
ENDIF()
|
||||
IF(PA_USE_ASIO)
|
||||
SET(PA_PRIVATE_INCLUDE_PATHS ${PA_PRIVATE_INCLUDE_PATHS} ${ASIOSDK_ROOT_DIR}/common)
|
||||
SET(PA_PRIVATE_INCLUDE_PATHS ${PA_PRIVATE_INCLUDE_PATHS} ${ASIOSDK_ROOT_DIR}/host)
|
||||
SET(PA_PRIVATE_INCLUDE_PATHS ${PA_PRIVATE_INCLUDE_PATHS} ${ASIOSDK_ROOT_DIR}/host/pc)
|
||||
SET(PA_ASIO_SOURCES src/hostapi/asio/pa_asio.cpp src/hostapi/asio/iasiothiscallresolver.cpp)
|
||||
SET(PA_ASIOSDK_SOURCES ${ASIOSDK_ROOT_DIR}/common/asio.cpp ${ASIOSDK_ROOT_DIR}/host/pc/asiolist.cpp ${ASIOSDK_ROOT_DIR}/host/asiodrivers.cpp)
|
||||
SOURCE_GROUP("hostapi\\ASIO" FILES ${PA_ASIO_SOURCES})
|
||||
SOURCE_GROUP("hostapi\\ASIO\\ASIOSDK" FILES ${PA_ASIOSDK_SOURCES})
|
||||
SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_asio.h)
|
||||
SET(PA_SOURCES ${PA_SOURCES} ${PA_ASIO_SOURCES})
|
||||
SET(PA_NON_UNICODE_SOURCES ${PA_NON_UNICODE_SOURCES} ${PA_ASIOSDK_SOURCES})
|
||||
SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ole32 uuid)
|
||||
ELSE()
|
||||
# Set variables for DEF file expansion
|
||||
SET(DEF_EXCLUDE_ASIO_SYMBOLS ";")
|
||||
ENDIF()
|
||||
|
||||
# Try to find DirectX SDK
|
||||
FIND_PACKAGE(DXSDK)
|
||||
IF(DXSDK_FOUND)
|
||||
OPTION(PA_USE_DS "Enable support for DirectSound" ON)
|
||||
ELSE()
|
||||
OPTION(PA_USE_DS "Enable support for DirectSound" OFF)
|
||||
ENDIF()
|
||||
IF(PA_USE_DS)
|
||||
OPTION(PA_USE_DIRECTSOUNDFULLDUPLEXCREATE "Use DirectSound full duplex create" ON)
|
||||
MARK_AS_ADVANCED(PA_USE_DIRECTSOUNDFULLDUPLEXCREATE)
|
||||
IF(PA_USE_DIRECTSOUNDFULLDUPLEXCREATE)
|
||||
SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE)
|
||||
ENDIF()
|
||||
SET(PA_PRIVATE_INCLUDE_PATHS ${PA_PRIVATE_INCLUDE_PATHS} ${DXSDK_INCLUDE_DIR})
|
||||
SET(PA_DS_INCLUDES src/hostapi/dsound/pa_win_ds_dynlink.h)
|
||||
SET(PA_DS_SOURCES src/hostapi/dsound/pa_win_ds.c src/hostapi/dsound/pa_win_ds_dynlink.c)
|
||||
SOURCE_GROUP("hostapi\\dsound" FILES ${PA_DS_INCLUDES} ${PA_DS_SOURCES})
|
||||
SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_win_ds.h)
|
||||
SET(PA_PRIVATE_INCLUDES ${PA_PRIVATE_INCLUDES} ${PA_DS_INCLUDES})
|
||||
SET(PA_SOURCES ${PA_SOURCES} ${PA_DS_SOURCES})
|
||||
|
||||
# If we use DirectSound, we need this for the library to be found (if not in VS project settings)
|
||||
IF(DXSDK_FOUND)
|
||||
SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ${DXSDK_DSOUND_LIBRARY})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
OPTION(PA_USE_WMME "Enable support for MME" ON)
|
||||
IF(PA_USE_WMME)
|
||||
SET(PA_WMME_SOURCES src/hostapi/wmme/pa_win_wmme.c)
|
||||
SOURCE_GROUP("hostapi\\wmme" FILES ${PA_WMME_SOURCES})
|
||||
SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_win_wmme.h)
|
||||
SET(PA_SOURCES ${PA_SOURCES} ${PA_WMME_SOURCES})
|
||||
SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ole32 uuid)
|
||||
ENDIF()
|
||||
|
||||
IF(MSVS)
|
||||
OPTION(PA_USE_WASAPI "Enable support for WASAPI" ON)
|
||||
ELSE()
|
||||
# I was unable to get WASAPI to compile outside of Visual Studio. If
|
||||
# anyone can figure out how to make this work with MinGW, please fix me.
|
||||
SET(PA_USE_WASAPI OFF)
|
||||
ENDIF()
|
||||
IF(PA_USE_WASAPI)
|
||||
SET(PA_WASAPI_SOURCES src/hostapi/wasapi/pa_win_wasapi.c)
|
||||
SOURCE_GROUP("hostapi\\wasapi" FILES ${PA_WASAPI_SOURCES})
|
||||
SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_win_wasapi.h)
|
||||
SET(PA_SOURCES ${PA_SOURCES} ${PA_WASAPI_SOURCES})
|
||||
SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ole32 uuid)
|
||||
IF(NOT MSVC)
|
||||
SET(PA_PRIVATE_INCLUDE_PATHS ${PA_PRIVATE_INCLUDE_PATHS} src/hostapi/wasapi/mingw-include)
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET(DEF_EXCLUDE_WASAPI_SYMBOLS ";")
|
||||
ENDIF()
|
||||
|
||||
OPTION(PA_USE_WDMKS "Enable support for WDMKS" ON)
|
||||
IF(PA_USE_WDMKS)
|
||||
SET(PA_WDMKS_SOURCES src/hostapi/wdmks/pa_win_wdmks.c)
|
||||
SOURCE_GROUP("hostapi\\wdmks" FILES ${PA_WDMKS_SOURCES})
|
||||
SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_win_wdmks.h)
|
||||
SET(PA_SOURCES ${PA_SOURCES} ${PA_WDMKS_SOURCES})
|
||||
SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} setupapi ole32 uuid)
|
||||
ENDIF()
|
||||
|
||||
OPTION(PA_USE_WDMKS_DEVICE_INFO "Use WDM/KS API for device info" ON)
|
||||
MARK_AS_ADVANCED(PA_USE_WDMKS_DEVICE_INFO)
|
||||
IF(PA_USE_WDMKS_DEVICE_INFO)
|
||||
SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PAWIN_USE_WDMKS_DEVICE_INFO)
|
||||
ENDIF()
|
||||
|
||||
SET(GENERATED_MESSAGE "CMake generated file, do NOT edit! Use CMake-GUI to change configuration instead.")
|
||||
CONFIGURE_FILE(cmake_support/template_portaudio.def ${CMAKE_CURRENT_BINARY_DIR}/portaudio_cmake.def @ONLY)
|
||||
CONFIGURE_FILE(cmake_support/options_cmake.h.in ${CMAKE_CURRENT_BINARY_DIR}/options_cmake.h @ONLY)
|
||||
SET(PA_PRIVATE_INCLUDES ${PA_PRIVATE_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}/options_cmake.h)
|
||||
SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PORTAUDIO_CMAKE_GENERATED)
|
||||
SOURCE_GROUP("cmake_generated" FILES ${CMAKE_CURRENT_BINARY_DIR}/portaudio_cmake.def ${CMAKE_CURRENT_BINARY_DIR}/options_cmake.h)
|
||||
|
||||
SET(PA_EXTRA_SHARED_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/portaudio_cmake.def)
|
||||
|
||||
ELSE()
|
||||
|
||||
SET(PA_PRIVATE_INCLUDE_PATHS ${PA_PRIVATE_INCLUDE_PATHS} src/os/unix)
|
||||
SET(PA_PLATFORM_SOURCES src/os/unix/pa_unix_hostapis.c src/os/unix/pa_unix_util.c)
|
||||
SOURCE_GROUP("os\\unix" FILES ${PA_PLATFORM_SOURCES})
|
||||
SET(PA_SOURCES ${PA_SOURCES} ${PA_PLATFORM_SOURCES})
|
||||
|
||||
IF(APPLE)
|
||||
|
||||
SET(CMAKE_MACOSX_RPATH 1)
|
||||
OPTION(PA_USE_COREAUDIO "Enable support for CoreAudio" ON)
|
||||
IF(PA_USE_COREAUDIO)
|
||||
SET(PA_COREAUDIO_SOURCES
|
||||
src/hostapi/coreaudio/pa_mac_core.c
|
||||
src/hostapi/coreaudio/pa_mac_core_blocking.c
|
||||
src/hostapi/coreaudio/pa_mac_core_utilities.c)
|
||||
SET(PA_COREAUDIO_INCLUDES
|
||||
src/hostapi/coreaudio/pa_mac_core_blocking.h
|
||||
src/hostapi/coreaudio/pa_mac_core_utilities.h)
|
||||
SOURCE_GROUP("hostapi\\coreaudio" FILES ${PA_COREAUDIO_SOURCES} ${PA_COREAUDIO_INCLUDES})
|
||||
SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_mac_core.h)
|
||||
SET(PA_PRIVATE_INCLUDES ${PA_PRIVATE_INCLUDES} ${PA_COREAUDIO_INCLUDES})
|
||||
SET(PA_SOURCES ${PA_SOURCES} ${PA_COREAUDIO_SOURCES})
|
||||
|
||||
FIND_LIBRARY(COREAUDIO_LIBRARY CoreAudio REQUIRED)
|
||||
FIND_LIBRARY(AUDIOTOOLBOX_LIBRARY AudioToolbox REQUIRED)
|
||||
FIND_LIBRARY(AUDIOUNIT_LIBRARY AudioUnit REQUIRED)
|
||||
FIND_LIBRARY(CARBON_LIBRARY Carbon REQUIRED)
|
||||
MARK_AS_ADVANCED(COREAUDIO_LIBRARY AUDIOTOOLBOX_LIBRARY AUDIOUNIT_LIBRARY CARBON_LIBRARY)
|
||||
SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ${COREAUDIO_LIBRARY} ${AUDIOTOOLBOX_LIBRARY} ${AUDIOUNIT_LIBRARY} ${CARBON_LIBRARY})
|
||||
SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PA_USE_COREAUDIO)
|
||||
SET(PA_PKGCONFIG_LDFLAGS "${PA_PKGCONFIG_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon")
|
||||
ENDIF()
|
||||
|
||||
ELSEIF(UNIX)
|
||||
|
||||
FIND_PACKAGE(Jack)
|
||||
IF(JACK_FOUND)
|
||||
OPTION(PA_USE_JACK "Enable support for Jack" ON)
|
||||
ELSE()
|
||||
OPTION(PA_USE_JACK "Enable support for Jack" OFF)
|
||||
ENDIF()
|
||||
IF(PA_USE_JACK)
|
||||
SET(PA_PRIVATE_INCLUDE_PATHS ${PA_PRIVATE_INCLUDE_PATHS} ${JACK_INCLUDE_DIRS})
|
||||
SET(PA_JACK_SOURCES src/hostapi/jack/pa_jack.c)
|
||||
SOURCE_GROUP("hostapi\\JACK" FILES ${PA_JACK_SOURCES})
|
||||
SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_jack.h)
|
||||
SET(PA_SOURCES ${PA_SOURCES} ${PA_JACK_SOURCES})
|
||||
SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PA_USE_JACK)
|
||||
SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ${JACK_LIBRARIES})
|
||||
SET(PA_PKGCONFIG_LDFLAGS "${PA_PKGCONFIG_LDFLAGS} -ljack")
|
||||
ENDIF()
|
||||
|
||||
FIND_PACKAGE(ALSA)
|
||||
IF(ALSA_FOUND)
|
||||
OPTION(PA_USE_ALSA "Enable support for ALSA" ON)
|
||||
ELSE()
|
||||
OPTION(PA_USE_ALSA "Enable support for ALSA" OFF)
|
||||
ENDIF()
|
||||
IF(PA_USE_ALSA)
|
||||
SET(PA_PRIVATE_INCLUDE_PATHS ${PA_PRIVATE_INCLUDE_PATHS} ${ALSA_INCLUDE_DIRS})
|
||||
SET(PA_ALSA_SOURCES src/hostapi/alsa/pa_linux_alsa.c)
|
||||
SOURCE_GROUP("hostapi\\ALSA" FILES ${PA_ALSA_SOURCES})
|
||||
SET(PA_PUBLIC_INCLUDES ${PA_PUBLIC_INCLUDES} include/pa_linux_alsa.h)
|
||||
SET(PA_SOURCES ${PA_SOURCES} ${PA_ALSA_SOURCES})
|
||||
SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PA_USE_ALSA)
|
||||
SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} ${ALSA_LIBRARIES})
|
||||
SET(PA_PKGCONFIG_LDFLAGS "${PA_PKGCONFIG_LDFLAGS} -lasound")
|
||||
ENDIF()
|
||||
|
||||
ENDIF()
|
||||
|
||||
find_package(Threads)
|
||||
SET(PA_PKGCONFIG_LDFLAGS "${PA_PKGCONFIG_LDFLAGS} -lm")
|
||||
SET(PA_LIBRARY_DEPENDENCIES ${PA_LIBRARY_DEPENDENCIES} m Threads::Threads)
|
||||
|
||||
ENDIF()
|
||||
|
||||
SOURCE_GROUP("include" FILES ${PA_PUBLIC_INCLUDES})
|
||||
|
||||
SET(PA_INCLUDES ${PA_PRIVATE_INCLUDES} ${PA_PUBLIC_INCLUDES})
|
||||
|
||||
IF(WIN32)
|
||||
OPTION(PA_UNICODE_BUILD "Enable Portaudio Unicode build" ON)
|
||||
IF(PA_UNICODE_BUILD)
|
||||
SET_SOURCE_FILES_PROPERTIES(${PA_SOURCES} PROPERTIES COMPILE_DEFINITIONS "UNICODE;_UNICODE")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
OPTION(PA_ENABLE_DEBUG_OUTPUT "Enable debug output for Portaudio" OFF)
|
||||
IF(PA_ENABLE_DEBUG_OUTPUT)
|
||||
SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PA_ENABLE_DEBUG_OUTPUT)
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(TestBigEndian)
|
||||
TEST_BIG_ENDIAN(IS_BIG_ENDIAN)
|
||||
IF(IS_BIG_ENDIAN)
|
||||
SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PA_BIG_ENDIAN)
|
||||
ELSE()
|
||||
SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PA_LITTLE_ENDIAN)
|
||||
ENDIF()
|
||||
|
||||
#ADD_LIBRARY(portaudio SHARED ${PA_INCLUDES} ${PA_COMMON_INCLUDES} ${PA_SOURCES} ${PA_NON_UNICODE_SOURCES} ${PA_EXTRA_SHARED_SOURCES})
|
||||
#SET_PROPERTY(TARGET portaudio APPEND_STRING PROPERTY COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS})
|
||||
#TARGET_INCLUDE_DIRECTORIES(portaudio BEFORE PRIVATE ${PA_PRIVATE_INCLUDE_PATHS})
|
||||
#TARGET_INCLUDE_DIRECTORIES(portaudio BEFORE PUBLIC include)
|
||||
#TARGET_LINK_LIBRARIES(portaudio ${PA_LIBRARY_DEPENDENCIES})
|
||||
|
||||
ADD_LIBRARY(portaudio_static STATIC ${PA_INCLUDES} ${PA_COMMON_INCLUDES} ${PA_SOURCES} ${PA_NON_UNICODE_SOURCES})
|
||||
SET_PROPERTY(TARGET portaudio_static APPEND_STRING PROPERTY COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS})
|
||||
TARGET_INCLUDE_DIRECTORIES(portaudio_static BEFORE PRIVATE ${PA_PRIVATE_INCLUDE_PATHS})
|
||||
TARGET_INCLUDE_DIRECTORIES(portaudio_static BEFORE PUBLIC include)
|
||||
TARGET_LINK_LIBRARIES(portaudio_static ${PA_LIBRARY_DEPENDENCIES})
|
||||
|
||||
IF(WIN32 AND MSVC)
|
||||
OPTION(PA_CONFIG_LIB_OUTPUT_PATH "Make sure that output paths are kept neat" OFF)
|
||||
IF(CMAKE_CL_64)
|
||||
SET(TARGET_POSTFIX x64)
|
||||
IF(PA_CONFIG_LIB_OUTPUT_PATH)
|
||||
SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin/x64)
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET(TARGET_POSTFIX x86)
|
||||
IF(PA_CONFIG_LIB_OUTPUT_PATH)
|
||||
SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin/Win32)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
#SET_TARGET_PROPERTIES(portaudio PROPERTIES OUTPUT_NAME portaudio_${TARGET_POSTFIX} FOLDER "Portaudio")
|
||||
SET_TARGET_PROPERTIES(portaudio_static PROPERTIES OUTPUT_NAME portaudio_static_${TARGET_POSTFIX} FOLDER "Portaudio")
|
||||
ELSE()
|
||||
IF(APPLE AND CMAKE_VERSION VERSION_GREATER 3.4.2)
|
||||
OPTION(PA_OUTPUT_OSX_FRAMEWORK "Generate an OS X framework instead of the simple library" OFF)
|
||||
IF(PA_OUTPUT_OSX_FRAMEWORK)
|
||||
SET_TARGET_PROPERTIES(portaudio PROPERTIES
|
||||
FRAMEWORK TRUE
|
||||
MACOSX_FRAMEWORK_IDENTIFIER com.portaudio
|
||||
FRAMEWORK_VERSION A
|
||||
PUBLIC_HEADER "${PA_PUBLIC_INCLUDES}"
|
||||
VERSION 19.0
|
||||
SOVERSION 19.0)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(NOT PA_OUTPUT_OSX_FRAMEWORK)
|
||||
CONFIGURE_FILE(cmake_support/portaudio-2.0.pc.in ${CMAKE_CURRENT_BINARY_DIR}/portaudio-2.0.pc @ONLY)
|
||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/portaudio-2.0.pc DESTINATION lib/pkgconfig)
|
||||
INSTALL(FILES ${PA_PUBLIC_INCLUDES} DESTINATION include)
|
||||
#INSTALL(TARGETS portaudio DESTINATION lib)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# Prepared for inclusion of test files
|
||||
OPTION(PA_BUILD_TESTS "Include test projects" OFF)
|
||||
IF(PA_BUILD_TESTS)
|
||||
SUBDIRS(test)
|
||||
ENDIF()
|
||||
|
||||
# Prepared for inclusion of test files
|
||||
OPTION(PA_BUILD_EXAMPLES "Include example projects" OFF)
|
||||
IF(PA_BUILD_EXAMPLES)
|
||||
SUBDIRS(examples)
|
||||
ENDIF()
|
||||
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
This directory contains the Visual Studio project files which are used to build portaudio.
|
||||
* portaudio's files were very old and messy
|
||||
* Makes it easier to update portaudio in the future
|
||||
* Uses dolphin's VSProps, so we know it's properly compatible
|
||||
|
||||
See full portaudio distribution for instructions about building and using portaudio.
|
||||
-73
@@ -1,73 +0,0 @@
|
||||
<?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|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{0A18A071-125E-442F-AFF7-A3F68ABECF99}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\Source\VSProps\Base.props" />
|
||||
<Import Project="..\..\..\Source\VSProps\ClDisableAllWarnings.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\src\common;..\include;.\;..\src\os\win;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>PA_ENABLE_DEBUG_OUTPUT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</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\hostapi\skeleton\pa_hostapi_skeleton.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\wmme\pa_win_wmme.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" />
|
||||
<ClCompile Include="..\src\os\win\pa_x86_plain_converters.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<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" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
-110
@@ -1,110 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{69112e69-92e4-40c1-aa5b-e4c4780ade42}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\common">
|
||||
<UniqueIdentifier>{ddf0cf9b-f2df-4549-a447-8d7c4c2128d7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\hostapi">
|
||||
<UniqueIdentifier>{219121eb-0c81-4948-a94c-6802cf152776}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\hostapi\dsound">
|
||||
<UniqueIdentifier>{17688226-7728-4556-83a7-8e85b561ccca}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\hostapi\wmme">
|
||||
<UniqueIdentifier>{520ee766-8582-402e-a935-bdbcaa0d44de}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\hostapi\wasapi">
|
||||
<UniqueIdentifier>{3891bf2e-9681-4394-be07-88e0a3fd2a68}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\hostapi\wdmks">
|
||||
<UniqueIdentifier>{16791044-a8a5-4f21-b032-08245e52777a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\os">
|
||||
<UniqueIdentifier>{bde5e4fb-71f2-4cdf-8879-5370d0e12697}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\os\win">
|
||||
<UniqueIdentifier>{f1e8b583-742d-46a2-ac7f-060aabdc3a2c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{d8832c7e-2dd0-48e7-8227-23b0d04c1879}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\common\pa_allocation.c">
|
||||
<Filter>Source Files\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\common\pa_converters.c">
|
||||
<Filter>Source Files\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\common\pa_cpuload.c">
|
||||
<Filter>Source Files\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\common\pa_debugprint.c">
|
||||
<Filter>Source Files\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\common\pa_dither.c">
|
||||
<Filter>Source Files\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\common\pa_front.c">
|
||||
<Filter>Source Files\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\hostapi\skeleton\pa_hostapi_skeleton.c">
|
||||
<Filter>Source Files\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\common\pa_process.c">
|
||||
<Filter>Source Files\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\common\pa_ringbuffer.c">
|
||||
<Filter>Source Files\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\common\pa_stream.c">
|
||||
<Filter>Source Files\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\common\pa_trace.c">
|
||||
<Filter>Source Files\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\hostapi\wmme\pa_win_wmme.c">
|
||||
<Filter>Source Files\hostapi\wmme</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\hostapi\wasapi\pa_win_wasapi.c">
|
||||
<Filter>Source Files\hostapi\wasapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\os\win\pa_win_coinitialize.c">
|
||||
<Filter>Source Files\os\win</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\os\win\pa_win_hostapis.c">
|
||||
<Filter>Source Files\os\win</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\os\win\pa_win_util.c">
|
||||
<Filter>Source Files\os\win</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\os\win\pa_win_waveformat.c">
|
||||
<Filter>Source Files\os\win</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\os\win\pa_win_wdmks_utils.c">
|
||||
<Filter>Source Files\os\win</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\os\win\pa_x86_plain_converters.c">
|
||||
<Filter>Source Files\os\win</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\include\pa_win_wasapi.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\pa_win_waveformat.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\pa_win_wmme.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\portaudio.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,41 +0,0 @@
|
||||
# $Id: $
|
||||
#
|
||||
# - Try to find the ASIO SDK
|
||||
# Once done this will define
|
||||
#
|
||||
# ASIOSDK_FOUND - system has ASIO SDK
|
||||
# ASIOSDK_ROOT_DIR - path to the ASIO SDK base directory
|
||||
# ASIOSDK_INCLUDE_DIR - the ASIO SDK include directory
|
||||
|
||||
if(WIN32)
|
||||
else(WIN32)
|
||||
message(FATAL_ERROR "FindASIOSDK.cmake: Unsupported platform ${CMAKE_SYSTEM_NAME}" )
|
||||
endif(WIN32)
|
||||
|
||||
file(GLOB results "${CMAKE_CURRENT_SOURCE_DIR}/../as*")
|
||||
foreach(f ${results})
|
||||
if(IS_DIRECTORY ${f})
|
||||
set(ASIOSDK_PATH_HINT ${ASIOSDK_PATH_HINT} ${f})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
find_path(ASIOSDK_ROOT_DIR
|
||||
common/asio.h
|
||||
HINTS
|
||||
${ASIOSDK_PATH_HINT}
|
||||
)
|
||||
|
||||
find_path(ASIOSDK_INCLUDE_DIR
|
||||
asio.h
|
||||
PATHS
|
||||
${ASIOSDK_ROOT_DIR}/common
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set ASIOSDK_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASIOSDK DEFAULT_MSG ASIOSDK_ROOT_DIR ASIOSDK_INCLUDE_DIR)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
ASIOSDK_ROOT_DIR ASIOSDK_INCLUDE_DIR
|
||||
)
|
||||
@@ -1,59 +0,0 @@
|
||||
# $Id: $
|
||||
#
|
||||
# - Try to find the DirectX SDK
|
||||
# Once done this will define
|
||||
#
|
||||
# DXSDK_FOUND - system has DirectX SDK
|
||||
# DXSDK_ROOT_DIR - path to the DirectX SDK base directory
|
||||
# DXSDK_INCLUDE_DIR - the DirectX SDK include directory
|
||||
# DXSDK_LIBRARY_DIR - DirectX SDK libraries path
|
||||
#
|
||||
# DXSDK_DSOUND_LIBRARY - Path to dsound.lib
|
||||
#
|
||||
|
||||
if(WIN32)
|
||||
else(WIN32)
|
||||
message(FATAL_ERROR "FindDXSDK.cmake: Unsupported platform ${CMAKE_SYSTEM_NAME}" )
|
||||
endif(WIN32)
|
||||
|
||||
find_path(DXSDK_ROOT_DIR
|
||||
include/dxsdkver.h
|
||||
HINTS
|
||||
$ENV{DXSDK_DIR}
|
||||
)
|
||||
|
||||
find_path(DXSDK_INCLUDE_DIR
|
||||
dxsdkver.h
|
||||
PATHS
|
||||
${DXSDK_ROOT_DIR}/include
|
||||
)
|
||||
|
||||
IF(CMAKE_CL_64)
|
||||
find_path(DXSDK_LIBRARY_DIR
|
||||
dsound.lib
|
||||
PATHS
|
||||
${DXSDK_ROOT_DIR}/lib/x64
|
||||
)
|
||||
ELSE(CMAKE_CL_64)
|
||||
find_path(DXSDK_LIBRARY_DIR
|
||||
dsound.lib
|
||||
PATHS
|
||||
${DXSDK_ROOT_DIR}/lib/x86
|
||||
)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
|
||||
find_library(DXSDK_DSOUND_LIBRARY
|
||||
dsound.lib
|
||||
PATHS
|
||||
${DXSDK_LIBRARY_DIR}
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set DXSDK_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DXSDK DEFAULT_MSG DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR
|
||||
DXSDK_LIBRARY_DIR DXSDK_DSOUND_LIBRARY
|
||||
)
|
||||
@@ -1,41 +0,0 @@
|
||||
# - Try to find jack
|
||||
# Once done this will define
|
||||
# JACK_FOUND - System has jack
|
||||
# JACK_INCLUDE_DIRS - The jack include directories
|
||||
# JACK_LIBRARIES - The libraries needed to use jack
|
||||
# JACK_DEFINITIONS - Compiler switches required for using jack
|
||||
|
||||
if (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
|
||||
|
||||
# in cache already
|
||||
set(JACK_FOUND TRUE)
|
||||
|
||||
else (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
|
||||
|
||||
set(JACK_DEFINITIONS "")
|
||||
|
||||
# Look for pkg-config and use it (if available) to find package
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_search_module(JACK QUIET jack)
|
||||
endif (PKG_CONFIG_FOUND)
|
||||
|
||||
if (NOT JACK_FOUND)
|
||||
|
||||
find_path(JACK_INCLUDE_DIR jack/jack.h HINTS ${JACK_INCLUDEDIR} ${JACK_INCLUDE_DIRS} PATH_SUFFIXES jack)
|
||||
find_library(JACK_LIBRARY NAMES jack HINTS ${JACK_LIBDIR} ${JACK_LIBRARY_DIRS})
|
||||
|
||||
set(JACK_LIBRARIES ${JACK_LIBRARY})
|
||||
set(JACK_INCLUDE_DIRS ${JACK_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
# Set JACK_FOUND if the library and include paths were found
|
||||
find_package_handle_standard_args(jack DEFAULT_MSG JACK_LIBRARY JACK_INCLUDE_DIR)
|
||||
|
||||
# Don't show include/library paths in cmake GUI
|
||||
mark_as_advanced(JACK_INCLUDE_DIR JACK_LIBRARY)
|
||||
|
||||
endif (NOT JACK_FOUND)
|
||||
|
||||
endif (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
|
||||
@@ -1,31 +0,0 @@
|
||||
/* $Id: $
|
||||
|
||||
!!! @GENERATED_MESSAGE@ !!!
|
||||
|
||||
Header file configured by CMake to convert CMake options/vars to macros. It is done this way because if set via
|
||||
preprocessor options, MSVC f.i. has no way of knowing when an option (or var) changes as there is no dependency chain.
|
||||
|
||||
The generated "options_cmake.h" should be included like so:
|
||||
|
||||
#ifdef PORTAUDIO_CMAKE_GENERATED
|
||||
#include "options_cmake.h"
|
||||
#endif
|
||||
|
||||
so that non-CMake build environments are left intact.
|
||||
|
||||
Source template: cmake_support/options_cmake.h.in
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(PA_USE_ASIO) || defined(PA_USE_DS) || defined(PA_USE_WMME) || defined(PA_USE_WASAPI) || defined(PA_USE_WDMKS)
|
||||
#error "This header needs to be included before pa_hostapi.h!!"
|
||||
#endif
|
||||
|
||||
#cmakedefine01 PA_USE_ASIO
|
||||
#cmakedefine01 PA_USE_DS
|
||||
#cmakedefine01 PA_USE_WMME
|
||||
#cmakedefine01 PA_USE_WASAPI
|
||||
#cmakedefine01 PA_USE_WDMKS
|
||||
#else
|
||||
#error "Platform currently not supported by CMake script"
|
||||
#endif
|
||||
@@ -1,12 +0,0 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: PortAudio
|
||||
Description: Portable audio I/O
|
||||
Requires:
|
||||
Version: @PA_PKGCONFIG_VERSION@
|
||||
|
||||
Libs: -L${libdir} -lportaudio @PA_PKGCONFIG_LDFLAGS@
|
||||
Cflags: -I${includedir} @PA_PKGCONFIG_CFLAGS@
|
||||
@@ -1,53 +0,0 @@
|
||||
; $Id: $
|
||||
;
|
||||
; !!! @GENERATED_MESSAGE@ !!!
|
||||
EXPORTS
|
||||
|
||||
;
|
||||
Pa_GetVersion @1
|
||||
Pa_GetVersionText @2
|
||||
Pa_GetErrorText @3
|
||||
Pa_Initialize @4
|
||||
Pa_Terminate @5
|
||||
Pa_GetHostApiCount @6
|
||||
Pa_GetDefaultHostApi @7
|
||||
Pa_GetHostApiInfo @8
|
||||
Pa_HostApiTypeIdToHostApiIndex @9
|
||||
Pa_HostApiDeviceIndexToDeviceIndex @10
|
||||
Pa_GetLastHostErrorInfo @11
|
||||
Pa_GetDeviceCount @12
|
||||
Pa_GetDefaultInputDevice @13
|
||||
Pa_GetDefaultOutputDevice @14
|
||||
Pa_GetDeviceInfo @15
|
||||
Pa_IsFormatSupported @16
|
||||
Pa_OpenStream @17
|
||||
Pa_OpenDefaultStream @18
|
||||
Pa_CloseStream @19
|
||||
Pa_SetStreamFinishedCallback @20
|
||||
Pa_StartStream @21
|
||||
Pa_StopStream @22
|
||||
Pa_AbortStream @23
|
||||
Pa_IsStreamStopped @24
|
||||
Pa_IsStreamActive @25
|
||||
Pa_GetStreamInfo @26
|
||||
Pa_GetStreamTime @27
|
||||
Pa_GetStreamCpuLoad @28
|
||||
Pa_ReadStream @29
|
||||
Pa_WriteStream @30
|
||||
Pa_GetStreamReadAvailable @31
|
||||
Pa_GetStreamWriteAvailable @32
|
||||
Pa_GetSampleSize @33
|
||||
Pa_Sleep @34
|
||||
@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetAvailableBufferSizes @50
|
||||
@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_ShowControlPanel @51
|
||||
@DEF_EXCLUDE_X86_PLAIN_CONVERTERS@PaUtil_InitializeX86PlainConverters @52
|
||||
@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetInputChannelName @53
|
||||
@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetOutputChannelName @54
|
||||
PaUtil_SetDebugPrintFunction @55
|
||||
@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetDeviceDefaultFormat @56
|
||||
@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetDeviceRole @57
|
||||
@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_ThreadPriorityBoost @58
|
||||
@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_ThreadPriorityRevert @59
|
||||
@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetFramesPerHostBuffer @60
|
||||
@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetJackDescription @61
|
||||
@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetJackCount @62
|
||||
-150
@@ -1,150 +0,0 @@
|
||||
#ifndef PA_ASIO_H
|
||||
#define PA_ASIO_H
|
||||
/*
|
||||
* $Id$
|
||||
* PortAudio Portable Real-Time Audio Library
|
||||
* ASIO specific extensions
|
||||
*
|
||||
* Copyright (c) 1999-2000 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 ASIO-specific PortAudio API extension header file.
|
||||
*/
|
||||
|
||||
#include "portaudio.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
/** Retrieve legal native buffer sizes for the specificed device, in sample frames.
|
||||
|
||||
@param device The global index of the device about which the query is being made.
|
||||
@param minBufferSizeFrames A pointer to the location which will receive the minimum buffer size value.
|
||||
@param maxBufferSizeFrames A pointer to the location which will receive the maximum buffer size value.
|
||||
@param preferredBufferSizeFrames A pointer to the location which will receive the preferred buffer size value.
|
||||
@param granularity A pointer to the location which will receive the "granularity". This value determines
|
||||
the step size used to compute the legal values between minBufferSizeFrames and maxBufferSizeFrames.
|
||||
If granularity is -1 then available buffer size values are powers of two.
|
||||
|
||||
@see ASIOGetBufferSize in the ASIO SDK.
|
||||
|
||||
@note: this function used to be called PaAsio_GetAvailableLatencyValues. There is a
|
||||
#define that maps PaAsio_GetAvailableLatencyValues to this function for backwards compatibility.
|
||||
*/
|
||||
PaError PaAsio_GetAvailableBufferSizes( PaDeviceIndex device,
|
||||
long *minBufferSizeFrames, long *maxBufferSizeFrames, long *preferredBufferSizeFrames, long *granularity );
|
||||
|
||||
|
||||
/** Backwards compatibility alias for PaAsio_GetAvailableBufferSizes
|
||||
|
||||
@see PaAsio_GetAvailableBufferSizes
|
||||
*/
|
||||
#define PaAsio_GetAvailableLatencyValues PaAsio_GetAvailableBufferSizes
|
||||
|
||||
|
||||
/** Display the ASIO control panel for the specified device.
|
||||
|
||||
@param device The global index of the device whose control panel is to be displayed.
|
||||
@param systemSpecific On Windows, the calling application's main window handle,
|
||||
on Macintosh this value should be zero.
|
||||
*/
|
||||
PaError PaAsio_ShowControlPanel( PaDeviceIndex device, void* systemSpecific );
|
||||
|
||||
|
||||
|
||||
|
||||
/** Retrieve a pointer to a string containing the name of the specified
|
||||
input channel. The string is valid until Pa_Terminate is called.
|
||||
|
||||
The string will be no longer than 32 characters including the null terminator.
|
||||
*/
|
||||
PaError PaAsio_GetInputChannelName( PaDeviceIndex device, int channelIndex,
|
||||
const char** channelName );
|
||||
|
||||
|
||||
/** Retrieve a pointer to a string containing the name of the specified
|
||||
input channel. The string is valid until Pa_Terminate is called.
|
||||
|
||||
The string will be no longer than 32 characters including the null terminator.
|
||||
*/
|
||||
PaError PaAsio_GetOutputChannelName( PaDeviceIndex device, int channelIndex,
|
||||
const char** channelName );
|
||||
|
||||
|
||||
/** Set the sample rate of an open paASIO stream.
|
||||
|
||||
@param stream The stream to operate on.
|
||||
@param sampleRate The new sample rate.
|
||||
|
||||
Note that this function may fail if the stream is alredy running and the
|
||||
ASIO driver does not support switching the sample rate of a running stream.
|
||||
|
||||
Returns paIncompatibleStreamHostApi if stream is not a paASIO stream.
|
||||
*/
|
||||
PaError PaAsio_SetStreamSampleRate( PaStream* stream, double sampleRate );
|
||||
|
||||
|
||||
#define paAsioUseChannelSelectors (0x01)
|
||||
|
||||
typedef struct PaAsioStreamInfo{
|
||||
unsigned long size; /**< sizeof(PaAsioStreamInfo) */
|
||||
PaHostApiTypeId hostApiType; /**< paASIO */
|
||||
unsigned long version; /**< 1 */
|
||||
|
||||
unsigned long flags;
|
||||
|
||||
/* Support for opening only specific channels of an ASIO device.
|
||||
If the paAsioUseChannelSelectors flag is set, channelSelectors is a
|
||||
pointer to an array of integers specifying the device channels to use.
|
||||
When used, the length of the channelSelectors array must match the
|
||||
corresponding channelCount parameter to Pa_OpenStream() otherwise a
|
||||
crash may result.
|
||||
The values in the selectors array must specify channels within the
|
||||
range of supported channels for the device or paInvalidChannelCount will
|
||||
result.
|
||||
*/
|
||||
int *channelSelectors;
|
||||
}PaAsioStreamInfo;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* PA_ASIO_H */
|
||||
-77
@@ -1,77 +0,0 @@
|
||||
#ifndef PA_JACK_H
|
||||
#define PA_JACK_H
|
||||
|
||||
/*
|
||||
* $Id:
|
||||
* PortAudio Portable Real-Time Audio Library
|
||||
* JACK-specific extensions
|
||||
*
|
||||
* Copyright (c) 1999-2000 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 JACK-specific PortAudio API extension header file.
|
||||
*/
|
||||
|
||||
#include "portaudio.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Set the JACK client name.
|
||||
*
|
||||
* During Pa_Initialize, When PA JACK connects as a client of the JACK server, it requests a certain
|
||||
* name, which is for instance prepended to port names. By default this name is "PortAudio". The
|
||||
* JACK server may append a suffix to the client name, in order to avoid clashes among clients that
|
||||
* try to connect with the same name (e.g., different PA JACK clients).
|
||||
*
|
||||
* This function must be called before Pa_Initialize, otherwise it won't have any effect. Note that
|
||||
* the string is not copied, but instead referenced directly, so it must not be freed for as long as
|
||||
* PA might need it.
|
||||
* @sa PaJack_GetClientName
|
||||
*/
|
||||
PaError PaJack_SetClientName( const char* name );
|
||||
|
||||
/** Get the JACK client name used by PA JACK.
|
||||
*
|
||||
* The caller is responsible for freeing the returned pointer.
|
||||
*/
|
||||
PaError PaJack_GetClientName(const char** clientName);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
-107
@@ -1,107 +0,0 @@
|
||||
#ifndef PA_LINUX_ALSA_H
|
||||
#define PA_LINUX_ALSA_H
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
* PortAudio Portable Real-Time Audio Library
|
||||
* ALSA-specific extensions
|
||||
*
|
||||
* Copyright (c) 1999-2000 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 ALSA-specific PortAudio API extension header file.
|
||||
*/
|
||||
|
||||
#include "portaudio.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct PaAlsaStreamInfo
|
||||
{
|
||||
unsigned long size;
|
||||
PaHostApiTypeId hostApiType;
|
||||
unsigned long version;
|
||||
|
||||
const char *deviceString;
|
||||
}
|
||||
PaAlsaStreamInfo;
|
||||
|
||||
/** Initialize host API specific structure, call this before setting relevant attributes. */
|
||||
void PaAlsa_InitializeStreamInfo( PaAlsaStreamInfo *info );
|
||||
|
||||
/** Instruct whether to enable real-time priority when starting the audio thread.
|
||||
*
|
||||
* If this is turned on by the stream is started, the audio callback thread will be created
|
||||
* with the FIFO scheduling policy, which is suitable for realtime operation.
|
||||
**/
|
||||
void PaAlsa_EnableRealtimeScheduling( PaStream *s, int enable );
|
||||
|
||||
#if 0
|
||||
void PaAlsa_EnableWatchdog( PaStream *s, int enable );
|
||||
#endif
|
||||
|
||||
/** Get the ALSA-lib card index of this stream's input device. */
|
||||
PaError PaAlsa_GetStreamInputCard( PaStream *s, int *card );
|
||||
|
||||
/** Get the ALSA-lib card index of this stream's output device. */
|
||||
PaError PaAlsa_GetStreamOutputCard( PaStream *s, int *card );
|
||||
|
||||
/** Set the number of periods (buffer fragments) to configure devices with.
|
||||
*
|
||||
* By default the number of periods is 4, this is the lowest number of periods that works well on
|
||||
* the author's soundcard.
|
||||
* @param numPeriods The number of periods.
|
||||
*/
|
||||
PaError PaAlsa_SetNumPeriods( int numPeriods );
|
||||
|
||||
/** Set the maximum number of times to retry opening busy device (sleeping for a
|
||||
* short interval inbetween).
|
||||
*/
|
||||
PaError PaAlsa_SetRetriesBusy( int retries );
|
||||
|
||||
/** Set the path and name of ALSA library file if PortAudio is configured to load it dynamically (see
|
||||
* PA_ALSA_DYNAMIC). This setting will overwrite the default name set by PA_ALSA_PATHNAME define.
|
||||
* @param pathName Full path with filename. Only filename can be used, but dlopen() will lookup default
|
||||
* searchable directories (/usr/lib;/usr/local/lib) then.
|
||||
*/
|
||||
void PaAlsa_SetLibraryPathName( const char *pathName );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
-191
@@ -1,191 +0,0 @@
|
||||
#ifndef PA_MAC_CORE_H
|
||||
#define PA_MAC_CORE_H
|
||||
/*
|
||||
* PortAudio Portable Real-Time Audio Library
|
||||
* Macintosh Core Audio specific extensions
|
||||
* portaudio.h should be included before this file.
|
||||
*
|
||||
* Copyright (c) 2005-2006 Bjorn Roche
|
||||
*
|
||||
* 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 CoreAudio-specific PortAudio API extension header file.
|
||||
*/
|
||||
|
||||
#include "portaudio.h"
|
||||
|
||||
#include <AudioUnit/AudioUnit.h>
|
||||
#include <AudioToolbox/AudioToolbox.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* A pointer to a paMacCoreStreamInfo may be passed as
|
||||
* the hostApiSpecificStreamInfo in the PaStreamParameters struct
|
||||
* when opening a stream or querying the format. Use NULL, for the
|
||||
* defaults. Note that for duplex streams, flags for input and output
|
||||
* should be the same or behaviour is undefined.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
unsigned long size; /**size of whole structure including this header */
|
||||
PaHostApiTypeId hostApiType; /**host API for which this data is intended */
|
||||
unsigned long version; /**structure version */
|
||||
unsigned long flags; /** flags to modify behaviour */
|
||||
SInt32 const * channelMap; /** Channel map for HAL channel mapping , if not needed, use NULL;*/
|
||||
unsigned long channelMapSize; /** Channel map size for HAL channel mapping , if not needed, use 0;*/
|
||||
} PaMacCoreStreamInfo;
|
||||
|
||||
/**
|
||||
* Functions
|
||||
*/
|
||||
|
||||
|
||||
/** Use this function to initialize a paMacCoreStreamInfo struct
|
||||
* using the requested flags. Note that channel mapping is turned
|
||||
* off after a call to this function.
|
||||
* @param data The datastructure to initialize
|
||||
* @param flags The flags to initialize the datastructure with.
|
||||
*/
|
||||
void PaMacCore_SetupStreamInfo( PaMacCoreStreamInfo *data, unsigned long flags );
|
||||
|
||||
/** call this after pa_SetupMacCoreStreamInfo to use channel mapping as described in notes.txt.
|
||||
* @param data The stream info structure to assign a channel mapping to
|
||||
* @param channelMap The channel map array, as described in notes.txt. This array pointer will be used directly (ie the underlying data will not be copied), so the caller should not free the array until after the stream has been opened.
|
||||
* @param channelMapSize The size of the channel map array.
|
||||
*/
|
||||
void PaMacCore_SetupChannelMap( PaMacCoreStreamInfo *data, const SInt32 * const channelMap, unsigned long channelMapSize );
|
||||
|
||||
/**
|
||||
* Retrieve the AudioDeviceID of the input device assigned to an open stream
|
||||
*
|
||||
* @param s The stream to query.
|
||||
*
|
||||
* @return A valid AudioDeviceID, or NULL if an error occurred.
|
||||
*/
|
||||
AudioDeviceID PaMacCore_GetStreamInputDevice( PaStream* s );
|
||||
|
||||
/**
|
||||
* Retrieve the AudioDeviceID of the output device assigned to an open stream
|
||||
*
|
||||
* @param s The stream to query.
|
||||
*
|
||||
* @return A valid AudioDeviceID, or NULL if an error occurred.
|
||||
*/
|
||||
AudioDeviceID PaMacCore_GetStreamOutputDevice( PaStream* s );
|
||||
|
||||
/**
|
||||
* Returns a statically allocated string with the device's name
|
||||
* for the given channel. NULL will be returned on failure.
|
||||
*
|
||||
* This function's implemenation is not complete!
|
||||
*
|
||||
* @param device The PortAudio device index.
|
||||
* @param channel The channel number who's name is requested.
|
||||
* @return a statically allocated string with the name of the device.
|
||||
* Because this string is statically allocated, it must be
|
||||
* coppied if it is to be saved and used by the user after
|
||||
* another call to this function.
|
||||
*
|
||||
*/
|
||||
const char *PaMacCore_GetChannelName( int device, int channelIndex, bool input );
|
||||
|
||||
|
||||
/** Retrieve the range of legal native buffer sizes for the specificed device, in sample frames.
|
||||
|
||||
@param device The global index of the PortAudio device about which the query is being made.
|
||||
@param minBufferSizeFrames A pointer to the location which will receive the minimum buffer size value.
|
||||
@param maxBufferSizeFrames A pointer to the location which will receive the maximum buffer size value.
|
||||
|
||||
@see kAudioDevicePropertyBufferFrameSizeRange in the CoreAudio SDK.
|
||||
*/
|
||||
PaError PaMacCore_GetBufferSizeRange( PaDeviceIndex device,
|
||||
long *minBufferSizeFrames, long *maxBufferSizeFrames );
|
||||
|
||||
|
||||
/**
|
||||
* Flags
|
||||
*/
|
||||
|
||||
/**
|
||||
* The following flags alter the behaviour of PA on the mac platform.
|
||||
* they can be ORed together. These should work both for opening and
|
||||
* checking a device.
|
||||
*/
|
||||
|
||||
/** Allows PortAudio to change things like the device's frame size,
|
||||
* which allows for much lower latency, but might disrupt the device
|
||||
* if other programs are using it, even when you are just Querying
|
||||
* the device. */
|
||||
#define paMacCoreChangeDeviceParameters (0x01)
|
||||
|
||||
/** In combination with the above flag,
|
||||
* causes the stream opening to fail, unless the exact sample rates
|
||||
* are supported by the device. */
|
||||
#define paMacCoreFailIfConversionRequired (0x02)
|
||||
|
||||
/** These flags set the SR conversion quality, if required. The wierd ordering
|
||||
* allows Maximum Quality to be the default.*/
|
||||
#define paMacCoreConversionQualityMin (0x0100)
|
||||
#define paMacCoreConversionQualityMedium (0x0200)
|
||||
#define paMacCoreConversionQualityLow (0x0300)
|
||||
#define paMacCoreConversionQualityHigh (0x0400)
|
||||
#define paMacCoreConversionQualityMax (0x0000)
|
||||
|
||||
/**
|
||||
* Here are some "preset" combinations of flags (above) to get to some
|
||||
* common configurations. THIS IS OVERKILL, but if more flags are added
|
||||
* it won't be.
|
||||
*/
|
||||
|
||||
/**This is the default setting: do as much sample rate conversion as possible
|
||||
* and as little mucking with the device as possible. */
|
||||
#define paMacCorePlayNice (0x00)
|
||||
/**This setting is tuned for pro audio apps. It allows SR conversion on input
|
||||
and output, but it tries to set the appropriate SR on the device.*/
|
||||
#define paMacCorePro (0x01)
|
||||
/**This is a setting to minimize CPU usage and still play nice.*/
|
||||
#define paMacCoreMinimizeCPUButPlayNice (0x0100)
|
||||
/**This is a setting to minimize CPU usage, even if that means interrupting the device. */
|
||||
#define paMacCoreMinimizeCPU (0x0101)
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /** __cplusplus */
|
||||
|
||||
#endif /** PA_MAC_CORE_H */
|
||||
-95
@@ -1,95 +0,0 @@
|
||||
#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 */
|
||||
-443
@@ -1,443 +0,0 @@
|
||||
#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 */
|
||||
-199
@@ -1,199 +0,0 @@
|
||||
#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 */
|
||||
-137
@@ -1,137 +0,0 @@
|
||||
#ifndef PA_WIN_WDMKS_H
|
||||
#define PA_WIN_WDMKS_H
|
||||
/*
|
||||
* $Id$
|
||||
* PortAudio Portable Real-Time Audio Library
|
||||
* WDM/KS 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 WDM Kernel Streaming-specific PortAudio API extension header file.
|
||||
*/
|
||||
|
||||
|
||||
#include "portaudio.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
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 */
|
||||
|
||||
/** 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
|
||||
{
|
||||
Type_kNotUsed,
|
||||
Type_kWaveCyclic,
|
||||
Type_kWaveRT,
|
||||
Type_kCnt,
|
||||
} PaWDMKSType;
|
||||
|
||||
typedef enum PaWDMKSSubType
|
||||
{
|
||||
SubType_kUnknown,
|
||||
SubType_kNotification,
|
||||
SubType_kPolled,
|
||||
SubType_kCnt,
|
||||
} PaWDMKSSubType;
|
||||
|
||||
typedef struct PaWinWDMKSDeviceInfo {
|
||||
wchar_t filterPath[MAX_PATH]; /**< KS filter path in Unicode! */
|
||||
wchar_t topologyPath[MAX_PATH]; /**< Topology filter path in Unicode! */
|
||||
PaWDMKSType streamingType;
|
||||
GUID deviceProductGuid; /**< The product GUID of the device (if supported) */
|
||||
} PaWinWDMKSDeviceInfo;
|
||||
|
||||
typedef struct PaWDMKSDirectionSpecificStreamInfo
|
||||
{
|
||||
PaDeviceIndex device;
|
||||
unsigned channels; /**< No of channels the device is opened with */
|
||||
unsigned framesPerHostBuffer; /**< No of frames of the device buffer */
|
||||
int endpointPinId; /**< Endpoint pin ID (on topology filter if topologyName is not empty) */
|
||||
int muxNodeId; /**< Only valid for input */
|
||||
PaWDMKSSubType streamingSubType; /**< Not known until device is opened for streaming */
|
||||
} PaWDMKSDirectionSpecificStreamInfo;
|
||||
|
||||
typedef struct PaWDMKSSpecificStreamInfo {
|
||||
PaWDMKSDirectionSpecificStreamInfo input;
|
||||
PaWDMKSDirectionSpecificStreamInfo output;
|
||||
} PaWDMKSSpecificStreamInfo;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* PA_WIN_DS_H */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user