Repository navigation
obs-transitions: Fade to Color switch point 0%/100% no longer yields NaN audio - #687
Merged
Merged
Conversation
Factors the gain math into fade-to-color-mix.h (behavior-neutral) and adds test_fade_to_color_mix. Refs #488.
Switch points of 0% and 100% divided by zero and produced NaN audio gains. Fixes #488. Local-Gate: v1 tree=46275812537035705f2baf2afda21c57bba1f53a secs=458 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run Ci-Attestation: {"at":1791959367,"gate":"rust/all/fmt","host":"linux-x86_64","key":"3f8fe24072a1f7dca78418b32724f231336f5e1c648852d32d49678dae83adf5","lane":"lint","parents":["32fdd261894410ca3d96f1ceb06dbc27279a2b7d"],"secs":46,"stamp":"c1c0d3e85a198ac240d1fbc391ec4660","tree":"46275812537035705f2baf2afda21c57bba1f53a","v":1,"via":"run"} Ci-Attestation: {"at":1791959367,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"3f8fe24072a1f7dca78418b32724f231336f5e1c648852d32d49678dae83adf5","lane":"lint","parents":["32fdd261894410ca3d96f1ceb06dbc27279a2b7d"],"secs":46,"stamp":"fb6c54edfa52ab315a9012f6da213d0f","tree":"46275812537035705f2baf2afda21c57bba1f53a","v":1,"via":"run"} Ci-Attestation: {"at":1791959367,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"b41146a3d3fe506ef0d9d037bb28fe29585148cdbb9aa3ab280ebccef5b9b897","lane":"rust-test","parents":["32fdd261894410ca3d96f1ceb06dbc27279a2b7d"],"secs":156,"stamp":"bf5118aa4f3e14a42cd5064bd83f2866","tree":"46275812537035705f2baf2afda21c57bba1f53a","v":1,"via":"run"} Ci-Attestation: {"at":1791959367,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"01b999fe10f75083fa3eba062bd669d7cb43b27dbe34279bd5ebc7ca759cc2d7","lane":"cross","parents":["32fdd261894410ca3d96f1ceb06dbc27279a2b7d"],"secs":109,"stamp":"025064b396edaacf5a83cac7083f9c31","tree":"46275812537035705f2baf2afda21c57bba1f53a","v":1,"via":"run"} Ci-Attestation: {"at":1791959367,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"01b999fe10f75083fa3eba062bd669d7cb43b27dbe34279bd5ebc7ca759cc2d7","lane":"cross","parents":["32fdd261894410ca3d96f1ceb06dbc27279a2b7d"],"secs":109,"stamp":"ca54061ae1f30569d51e09e4be880647","tree":"46275812537035705f2baf2afda21c57bba1f53a","v":1,"via":"run"} Ci-Attestation: {"at":1791959367,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"01b999fe10f75083fa3eba062bd669d7cb43b27dbe34279bd5ebc7ca759cc2d7","lane":"cross","parents":["32fdd261894410ca3d96f1ceb06dbc27279a2b7d"],"secs":109,"stamp":"dfa13bf6930d0b558ef94253134dc292","tree":"46275812537035705f2baf2afda21c57bba1f53a","v":1,"via":"run"} Ci-Attestation: {"at":1791959367,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"01b999fe10f75083fa3eba062bd669d7cb43b27dbe34279bd5ebc7ca759cc2d7","lane":"cross","parents":["32fdd261894410ca3d96f1ceb06dbc27279a2b7d"],"secs":109,"stamp":"d98ee9d30ebbf549c0429b659652f658","tree":"46275812537035705f2baf2afda21c57bba1f53a","v":1,"via":"run"} Ci-Attestation: {"at":1791959367,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"01b999fe10f75083fa3eba062bd669d7cb43b27dbe34279bd5ebc7ca759cc2d7","lane":"cross","parents":["32fdd261894410ca3d96f1ceb06dbc27279a2b7d"],"secs":109,"stamp":"ac9031b70aee9dfb46473d9fac0bb280","tree":"46275812537035705f2baf2afda21c57bba1f53a","v":1,"via":"run"} Ci-Attestation: {"at":1791959367,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"01b999fe10f75083fa3eba062bd669d7cb43b27dbe34279bd5ebc7ca759cc2d7","lane":"cross","parents":["32fdd261894410ca3d96f1ceb06dbc27279a2b7d"],"secs":109,"stamp":"f294f23ed9761ade424ed9426f8ade98","tree":"46275812537035705f2baf2afda21c57bba1f53a","v":1,"via":"run"} Ci-Attestation: {"at":1791959367,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"68f7b4dedcd68d9f29390fd681a163f5950c5746451a3270f1c1aea194b2927c","lane":"tier2-linux","parents":["32fdd261894410ca3d96f1ceb06dbc27279a2b7d"],"secs":147,"stamp":"40d0065b6c800f777ca2a883d487893c","tree":"46275812537035705f2baf2afda21c57bba1f53a","v":1,"via":"run"}
MSVC has no m.lib (LNK1104 on Rust Tier 2 Windows, run 38522525850).
Local-Gate: v1 tree=e44b6db399f58469cf9600347b3fb262fbb227b4 secs=445 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run
Ci-Attestation: {"at":1791961099,"gate":"rust/all/fmt","host":"linux-x86_64","key":"7750ea59cbaf6449b28576fe67da161417c1fc60013cdbee128af2c60ddb8769","lane":"lint","parents":["bd957c476ab8d5f5fa41f7dc5063efa0d5ec677a"],"secs":53,"stamp":"a68c70cddd76d91ceb44ffe7f2af4ac1","tree":"e44b6db399f58469cf9600347b3fb262fbb227b4","v":1,"via":"run"}
Ci-Attestation: {"at":1791961099,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"7750ea59cbaf6449b28576fe67da161417c1fc60013cdbee128af2c60ddb8769","lane":"lint","parents":["bd957c476ab8d5f5fa41f7dc5063efa0d5ec677a"],"secs":53,"stamp":"eb47714d3d42446d994712d1032b0d7b","tree":"e44b6db399f58469cf9600347b3fb262fbb227b4","v":1,"via":"run"}
Ci-Attestation: {"at":1791961099,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"86d2d337eec06904338ce50d397b6af290094d8c8c9d9b24ba1d3d410b8dfc52","lane":"rust-test","parents":["bd957c476ab8d5f5fa41f7dc5063efa0d5ec677a"],"secs":140,"stamp":"e18fd91ec3c12661301b6e198d9eac48","tree":"e44b6db399f58469cf9600347b3fb262fbb227b4","v":1,"via":"run"}
Ci-Attestation: {"at":1791961099,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"4d40a447a421632c3355872b5e5b5181528ecf16a2aa83ccb2015b14c041f10a","lane":"cross","parents":["bd957c476ab8d5f5fa41f7dc5063efa0d5ec677a"],"secs":103,"stamp":"b8d60f8933dba339599171b85438dc2a","tree":"e44b6db399f58469cf9600347b3fb262fbb227b4","v":1,"via":"run"}
Ci-Attestation: {"at":1791961099,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"4d40a447a421632c3355872b5e5b5181528ecf16a2aa83ccb2015b14c041f10a","lane":"cross","parents":["bd957c476ab8d5f5fa41f7dc5063efa0d5ec677a"],"secs":103,"stamp":"5e7c3eb453408d1c7c66f4fc6a6995fb","tree":"e44b6db399f58469cf9600347b3fb262fbb227b4","v":1,"via":"run"}
Ci-Attestation: {"at":1791961099,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"4d40a447a421632c3355872b5e5b5181528ecf16a2aa83ccb2015b14c041f10a","lane":"cross","parents":["bd957c476ab8d5f5fa41f7dc5063efa0d5ec677a"],"secs":103,"stamp":"96a7c0700d8a8edf833df15db7b39047","tree":"e44b6db399f58469cf9600347b3fb262fbb227b4","v":1,"via":"run"}
Ci-Attestation: {"at":1791961099,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"4d40a447a421632c3355872b5e5b5181528ecf16a2aa83ccb2015b14c041f10a","lane":"cross","parents":["bd957c476ab8d5f5fa41f7dc5063efa0d5ec677a"],"secs":103,"stamp":"c66efd6fbea82f61b29e726f1988cfd5","tree":"e44b6db399f58469cf9600347b3fb262fbb227b4","v":1,"via":"run"}
Ci-Attestation: {"at":1791961099,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"4d40a447a421632c3355872b5e5b5181528ecf16a2aa83ccb2015b14c041f10a","lane":"cross","parents":["bd957c476ab8d5f5fa41f7dc5063efa0d5ec677a"],"secs":103,"stamp":"39e0aab6a1a55c5ce736819c694ce20f","tree":"e44b6db399f58469cf9600347b3fb262fbb227b4","v":1,"via":"run"}
Ci-Attestation: {"at":1791961099,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"4d40a447a421632c3355872b5e5b5181528ecf16a2aa83ccb2015b14c041f10a","lane":"cross","parents":["bd957c476ab8d5f5fa41f7dc5063efa0d5ec677a"],"secs":103,"stamp":"7e3f8095e92b05befb66685371d9c280","tree":"e44b6db399f58469cf9600347b3fb262fbb227b4","v":1,"via":"run"}
Ci-Attestation: {"at":1791961099,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"3f735b4d41102e5db068edd2678d20abdaad107cba777dd70c3142d20bc72475","lane":"tier2-linux","parents":["bd957c476ab8d5f5fa41f7dc5063efa0d5ec677a"],"secs":150,"stamp":"a328600d729057f95d7e15b9809eff97","tree":"e44b6db399f58469cf9600347b3fb262fbb227b4","v":1,"via":"run"}
zackees
force-pushed
the
fix/488-fade-to-color-nan
branch
from
October 14, 2026 06:58
0312a1c to
ffa8368
Compare
Member
Author
|
Rust Tier 2 Windows failed to link the new test: |
10 tasks done
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.
Fixes #488
Fade to Color with a switch point of 0% or 100% divided by zero in
smoothstep(min, max, x)(max == min), giving NaN/inf audio gains. A zero-width ramp is now a step, so at 0% the outgoing source is silent immediately and at 100% the incoming source starts only at the end.Commits: RED 32fdd26 (behavior-neutral extraction of the gain math into
fade-to-color-mix.h+ newtest_fade_to_color_mix), GREEN 0312a1c (fix). Local gate stamped.RED (Tier 2,
run.sh, 4 of 5 tests fail on the unfixed math):GREEN (
rust/tools/linux-validate/run.sh): test_fade_to_color_mix Passed in both OFF and ON; "100% tests passed, 0 tests failed out of 195" (both); libobs exported symbols IDENTICAL (1766)../lintok.Video rendering is untouched (the unused
savalue at 0% was the only NaN-prone value there). Credit: chriscoveries' fork branch was offered but written fresh.