Merge upstream thestk/rtaudio master - #5
Merged
Conversation
RtApiAsio installed three of the four ASIO host callbacks and set asioCallbacks.bufferSwitchTimeInfo to NULL. Any driver that calls it therefore transfers control to address 0 and takes the process down. asioMessages() answers kAsioSupportsTimeInfo with 0, so by the letter of the SDK a driver should use bufferSwitch instead. Steinberg's Generic Low Latency ASIO driver calls bufferSwitchTimeInfo regardless, crashing on the first ASIOStart(). Removing kAsioSupportsTimeInfo from the kAsioSelectorSupported list as well does not help, so it consults neither answer. Since the host cannot control how a third-party driver behaves, and a call through a null function pointer is unrecoverable, supply the callback and forward it to bufferSwitch. The time info is not used. Fixes thestk#485. Very likely the root cause of thestk#409, and possibly thestk#443.
Add CMake option RTAUDIO_INSTALL
Fix GCC -Wshadow warning
[CMake|WIN32] Add a custom command to copy the DLL in the tests directory
…itchtimeinfo ASIO: provide bufferSwitchTimeInfo instead of leaving it NULL
Brings in upstream changes since the fork point: - ASIO: install a real bufferSwitchTimeInfo callback instead of NULL, fixing crashes with drivers that call it regardless of kAsioSupportsTimeInfo (upstream thestk#486) - CMake: new RTAUDIO_INSTALL option to skip install rules (upstream thestk#482) - CMake/WIN32: copy runtime DLLs next to test binaries (upstream thestk#484) - GCC -Wshadow fix in RtApiPulse::probeDeviceOpen (upstream thestk#474) Conflict resolution: RtApiPulse::probeDeviceOpen kept our version of the handle-allocation block. Our audit fix already removed the shadowed local that upstream's rename addressed, and additionally defers publishing the handle until it is fully constructed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SknrT2Cbre3nFzrcMZgDbV
Upstream thestk#484 defined copy_runtime_deps() inside if(WIN32) but calls it unconditionally, so any non-Windows configure with RTAUDIO_BUILD_TESTING=ON fails with 'Unknown CMake command'. Define the function unconditionally; it already no-ops off Windows via its internal WIN32 check. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SknrT2Cbre3nFzrcMZgDbV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Syncs the fork with
thestk/rtaudiomaster — we were 9 commits behind. Upstream changes brought in:bufferSwitchTimeInfocallback instead of leaving it NULL. Some drivers call it regardless of what the host answers tokAsioSupportsTimeInfo, which meant a call through a null pointer.RTAUDIO_INSTALLCMake option (upstream Add CMake option RTAUDIO_INSTALL thestk/rtaudio#482): allows embedding projects to skip install rules.-Wshadowfix (upstream Fix GCC -Wshadow warning thestk/rtaudio#474) inRtApiPulse::probeDeviceOpen.Conflict resolution
One conflict, in
RtApiPulse::probeDeviceOpen: upstream's-Wshadowfix renamed a shadowing localpah→pah2while keeping the old handle-publishing pattern. Our Phase 2/3 audit work had already restructured that block — no shadowed variable, and the handle is only published once fully constructed. Kept our version, which subsumes upstream's rename.Fix for an upstream regression
Upstream thestk#484 defines
copy_runtime_deps()insideif(WIN32)but calls it unconditionally, so any non-Windows configure withRTAUDIO_BUILD_TESTING=ON(which our Linux CI uses) fails withUnknown CMake command "copy_runtime_deps". A follow-up commit defines the function unconditionally — it already no-ops off Windows via its internalWIN32check. Candidate for contributing back upstream.Validation
-DRTAUDIO_BUILD_TESTING=ON -DRTAUDIO_WARNINGS_AS_ERRORS=ON: clean, no warnings.ctest: 3/3 tests pass (apitest, unittest, convtest).🤖 Generated with Claude Code
https://claude.ai/code/session_01SknrT2Cbre3nFzrcMZgDbV
Generated by Claude Code