Repository navigation
libobs: Synchronize capture and mixer audio state - #662
Merged
Merged
Conversation
Local-Gate: v1 tree=e6d5982bffde75e35349980671c9a122230698f6 secs=380 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run
Ci-Attestation: {"at":1791938304,"gate":"rust/all/fmt","host":"linux-x86_64","key":"c545af4887452d1b5c4a80993224d7f996020568a0f77bcc4274ca17c82eb096","lane":"lint","parents":["c14bd36efae3ee99be90050278a8bdac3dfb84e4"],"secs":34,"stamp":"b4c1c80318cdac91de93123f6c105de2","tree":"e6d5982bffde75e35349980671c9a122230698f6","v":1,"via":"run"}
Ci-Attestation: {"at":1791938304,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"c545af4887452d1b5c4a80993224d7f996020568a0f77bcc4274ca17c82eb096","lane":"lint","parents":["c14bd36efae3ee99be90050278a8bdac3dfb84e4"],"secs":34,"stamp":"573eef8fdf76a68c6bfe60f3e5f4663a","tree":"e6d5982bffde75e35349980671c9a122230698f6","v":1,"via":"run"}
Ci-Attestation: {"at":1791938304,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"e5e2bab33fd8d04947560d8cb7dcb69420a8c09b172b51708ca85cb40c0364a1","lane":"rust-test","parents":["c14bd36efae3ee99be90050278a8bdac3dfb84e4"],"secs":132,"stamp":"fb6c40abac9bb615a8db14a7816d80b1","tree":"e6d5982bffde75e35349980671c9a122230698f6","v":1,"via":"run"}
Ci-Attestation: {"at":1791938304,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"eb3e0e35395e0dba033468202d4d13193288ff3a42b5cba6c77f91b43519543a","lane":"cross","parents":["c14bd36efae3ee99be90050278a8bdac3dfb84e4"],"secs":95,"stamp":"2276a630a4051c8537495f8905aa4c35","tree":"e6d5982bffde75e35349980671c9a122230698f6","v":1,"via":"run"}
Ci-Attestation: {"at":1791938304,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"eb3e0e35395e0dba033468202d4d13193288ff3a42b5cba6c77f91b43519543a","lane":"cross","parents":["c14bd36efae3ee99be90050278a8bdac3dfb84e4"],"secs":95,"stamp":"c16e6b9935b1502b256b4b57d5ff4ca4","tree":"e6d5982bffde75e35349980671c9a122230698f6","v":1,"via":"run"}
Ci-Attestation: {"at":1791938304,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"eb3e0e35395e0dba033468202d4d13193288ff3a42b5cba6c77f91b43519543a","lane":"cross","parents":["c14bd36efae3ee99be90050278a8bdac3dfb84e4"],"secs":95,"stamp":"41cdee321b4340f1195a3ad8d83acd31","tree":"e6d5982bffde75e35349980671c9a122230698f6","v":1,"via":"run"}
Ci-Attestation: {"at":1791938304,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"eb3e0e35395e0dba033468202d4d13193288ff3a42b5cba6c77f91b43519543a","lane":"cross","parents":["c14bd36efae3ee99be90050278a8bdac3dfb84e4"],"secs":95,"stamp":"c6affd5596ce4282fc38bcb2dfe0fbbe","tree":"e6d5982bffde75e35349980671c9a122230698f6","v":1,"via":"run"}
Ci-Attestation: {"at":1791938304,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"eb3e0e35395e0dba033468202d4d13193288ff3a42b5cba6c77f91b43519543a","lane":"cross","parents":["c14bd36efae3ee99be90050278a8bdac3dfb84e4"],"secs":95,"stamp":"8d80aca117e90794754c2cb7215bee1b","tree":"e6d5982bffde75e35349980671c9a122230698f6","v":1,"via":"run"}
Ci-Attestation: {"at":1791938304,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"eb3e0e35395e0dba033468202d4d13193288ff3a42b5cba6c77f91b43519543a","lane":"cross","parents":["c14bd36efae3ee99be90050278a8bdac3dfb84e4"],"secs":95,"stamp":"6fd03ad04040c8866102a318968ed873","tree":"e6d5982bffde75e35349980671c9a122230698f6","v":1,"via":"run"}
Ci-Attestation: {"at":1791938304,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"ea2f62ae2dee39a4bbcca0e901a7406928d47e5648273c76cbcaf577e4f2e048","lane":"tier2-linux","parents":["c14bd36efae3ee99be90050278a8bdac3dfb84e4"],"secs":118,"stamp":"2d0a818cae27ffa088013afa2a374f41","tree":"e6d5982bffde75e35349980671c9a122230698f6","v":1,"via":"run"}
2 of 3 tasks
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.
Capture and mixing now use
audio_buf_mutexconsistently for source timestamps and input buffers. The initial timestamp check, sample copy, and volume timing share a protected snapshot. Buffer sufficiency, minimum timestamps, and backward-time recovery use the same mutex. Transition rendering reads each child's timestamp once through the synchronized accessor.Plugin audio callbacks and transition mix callbacks run without a source buffer lock held. No public signature or layout changes.
Fixes #130.
Validation:
RED
94909f355: the new real capture/mixer test fails under ThreadSanitizer inaudio_buffer_insufficient, reading a deque size concurrently withsource_output_audio_place/deque_upsize.GREEN
187d72a52and0c50becd0: ThreadSanitizer passes direct capture/mixing and capture beneath an active transition. The latter asserts successful transition audio renders and mix callbacks. The test paces capture with semaphores and uses no sleeps.Sanitizer build:
ENABLE_RUST_LIBOBS=OFF,ENABLE_UNIT_TESTS=ON, C/C++ flags-fsanitize=thread -fno-omit-frame-pointer; run under Xvfb withTSAN_OPTIONS=halt_on_error=1. The only suppression israce:libgalliumfor the external Mesa driver. Docker requires--security-opt seccomp=unconfinedso TSan can control ASLR.Pre-push review: clean, one reviewer; transition reader finding fixed and expanded regression validated.
Tier 2: all 192 C tests pass OFF and ON; the focused capture/transition test passed 100 consecutive runs in each configuration under Xvfb with
-noreset. Exported symbol sets are identical (1766 symbols).Final local gate passed all four lanes in 380 seconds; pushed head
7df40153479cis stamped for treee6d5982bffde.CI run
38491380151: all 21 checks passed or were appropriately skipped on7df40153479c, including native macOS and Windows Rust tests and OFF/ON C compatibility.