Skip to content

Commit d91393f

Browse files
committed
Enable ASIO for PortAudio
Add patch to make asio devices lazily initialized to prevent audio drops on startup
1 parent dd76b29 commit d91393f

3 files changed

Lines changed: 449 additions & 1 deletion

File tree

recipes/portaudio/build.cmake

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
get_property(_asiosdk_src GLOBAL PROPERTY asiosdk_SOURCE_DIR)
2+
if(BD_OS STREQUAL "windows" AND _asiosdk_src)
3+
file(GLOB_RECURSE _asio_hdrs "${_asiosdk_src}/*.h")
4+
foreach(_h ${_asio_hdrs})
5+
if(_h MATCHES "/common/asio\\.h$")
6+
get_filename_component(_asio_common "${_h}" DIRECTORY)
7+
get_filename_component(_asiosdk_root "${_asio_common}" DIRECTORY)
8+
break()
9+
endif()
10+
endforeach()
11+
if(NOT _asiosdk_root)
12+
message(FATAL_ERROR "[${BD_NAME}] asiosdk source at ${_asiosdk_src} has no common/asio.h")
13+
endif()
14+
message(STATUS "[${BD_NAME}] ASIO enabled, SDK root: ${_asiosdk_root}")
15+
list(APPEND DEP_CMAKE_ARGS -DPA_USE_ASIO=ON "-DASIOSDK_ROOT_DIR=${_asiosdk_root}")
16+
endif()
17+
18+
_bd_cmake_build("${SRC}")

0 commit comments

Comments
 (0)