From be7ac9332ad1692e43011f81d04f3e651d82124b Mon Sep 17 00:00:00 2001 From: Oleg Samarin Date: Mon, 29 Jan 2024 23:43:29 +0300 Subject: [PATCH] Fixed crash with rtaudio/asio https://github.com/GrandOrgue/grandorgue/issues/1772 (#1788) --- CHANGELOG.md | 1 + src/rt/rtaudio/CMakeLists.txt | 23 ++++++++++------------- submodules/RtAudio | 2 +- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0403236ed..2f69af63b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +- Fixed crash with rtaudio/asio https://github.com/GrandOrgue/grandorgue/issues/1772 - Added support of specifying different crossfade length for additional attack and release files https://github.com/GrandOrgue/grandorgue/issues/1760 - Fixed wrong filename of the midi recorder file with Hungarian language settings https://github.com/GrandOrgue/grandorgue/issues/1644 - Fixed unability to select the Hungarian language in the Organ Settings dialog diff --git a/src/rt/rtaudio/CMakeLists.txt b/src/rt/rtaudio/CMakeLists.txt index a5b6cb676..0fb6d2f06 100644 --- a/src/rt/rtaudio/CMakeLists.txt +++ b/src/rt/rtaudio/CMakeLists.txt @@ -1,16 +1,23 @@ # Copyright 2006 Milan Digital Audio LLC -# Copyright 2009-2023 GrandOrgue contributors (see AUTHORS) +# Copyright 2009-2024 GrandOrgue contributors (see AUTHORS) # License GPL-2.0 or later (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html). message(STATUS "RtAudio build Configuration") INCLUDE (CheckIncludeFileCXX) -include_directories("${RTAUDIO_SRC_DIR}/include") set(RtAudio_Sources "${RTAUDIO_SRC_DIR}/RtAudio.cpp") if (WIN32) if (RTAUDIO_USE_ASIO) + add_definitions(-D__WINDOWS_ASIO__ -D_WIN32_WINNT=0x0501 -DWINVER=0x0501) + # they should be included before ${RTAUDIO_SRC_DIR}/include because + # the same headers in ${RTAUDIO_SRC_DIR}/include are of a wrong version + include_directories( + "${ASIO_SDK_DIR}/common" + "${ASIO_SDK_DIR}/host" + "${ASIO_SDK_DIR}/host/pc" + ) set(RtAudio_Sources ${RtAudio_Sources} "${ASIO_SDK_DIR}/host/asiodrivers.cpp" "${ASIO_SDK_DIR}/host/pc/asiolist.cpp" @@ -20,6 +27,7 @@ if (WIN32) endif () endif () +include_directories("${RTAUDIO_SRC_DIR}/include") add_library(RtAudio STATIC ${RtAudio_Sources}) if (WIN32) @@ -33,17 +41,6 @@ if (WIN32) target_link_libraries(RtAudio dsound) endif () - if (RTAUDIO_USE_ASIO) - add_definitions(-D__WINDOWS_ASIO__ -D_WIN32_WINNT=0x0501 -DWINVER=0x0501) - include_directories( - "${ASIO_SDK_DIR}/common" - "${ASIO_SDK_DIR}/host" - "${ASIO_SDK_DIR}/host/pc" - ) - include_directories(asiohelpers) - include_directories(asiohelpers/include) - endif () - elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") message(STATUS " Building a Linux configuration") diff --git a/submodules/RtAudio b/submodules/RtAudio index b4f049033..6e962c042 160000 --- a/submodules/RtAudio +++ b/submodules/RtAudio @@ -1 +1 @@ -Subproject commit b4f04903312e0e0efffbe77655172e0f060dc085 +Subproject commit 6e962c0422b5953c82466ecf07765c471a7bfacb