Suppress duplicate outgoing OSC messages per route#54
Open
paul-toben wants to merge 2 commits into
Open
Conversation
Adds a per-destination "Max Rate (Hz)" field that caps how often a route emits OSC messages. Coalesce semantics: when input arrives faster than the configured rate, only the most recent message survives the period and is emitted at the next interval boundary; nothing is sent during silence. Useful for streaming sources (PSN, ArtNet/sACN-driven OSC bridges) where the input rate can saturate downstream consoles. Scope: OSC outputs only. sACN, ArtNet, MIDI, OTP, and PSN destinations are unaffected. Default 0 = unlimited; existing configs are unchanged. Refactor: per-destination dispatch in ProcessRecvPacket extracted into DispatchBuiltPacket, which returns whether a real send happened so the rate-limit timer only advances on actual sends. The flush pass runs once per main loop iteration after the TCP-clients section.
Adds a per-destination "Only Changes" checkbox that drops outgoing OSC messages whose bytes exactly match the previous send to that destination. Useful for streaming sources where the talent is often stationary and there's no point repeating the same value. When combined with the rate limit, the rate-limit timer only advances on a real send, so a stationary period followed by a sudden change emits immediately rather than waiting another full period. Comparison is byte-for-byte on the built OSC packet. Scope: OSC outputs only.
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.
Adds a per-destination "Only Changes" checkbox to each route. When enabled, outgoing OSC messages whose bytes are byte-identical to the previous send to that destination are suppressed.
Behavior
Stacks on #53
This PR depends on the refactor and the
DispatchBuiltPackethelper from the rate-limit PR. The diff shown here is cumulative until #53 lands; after that, this PR will rebase and show only its own changes.Implementation
DispatchBuiltPacket. On a successful send, the built packet is stashed inlastSentPacketfor the next compare..osc.txt(onlyChanges). Old configs load unchanged; new configs round-trip.