Fix config latency get to actively query device via ARC#51
Open
stanelie wants to merge 2 commits into
Open
Conversation
When a device advertises multiple IP addresses via mDNS (e.g. Dante VIA running on a host with several interfaces), always picking addresses[0] could return an address on the wrong interface. Use the configured --interface IP to select the address on the matching subnet instead, falling back to addresses[0] when no interface is configured or only one address is advertised. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously, the latency get command read device.latency which is only populated from the mDNS latency_ns property — not advertised by most devices including Dante VIA, so the command produced no output. Now the command sends a command_device_settings (opcode 0x1100) ARC request and parses the response with DanteParser.parse_device_settings. The latency_us field stores nanoseconds despite its name, so the value is divided by 1_000_000 to produce milliseconds. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
device config latency(get) previously readdevice.latency, which is only populated from the mDNSlatency_nsTXT record — not advertised by most devices, including Dante VIA. The command silently produced no output.command_device_settings(opcode0x1100) ARC request directly to the device and parses the response withDanteParser.parse_device_settings.latency_usfield inDeviceSettingsstores nanoseconds despite its name; the value is now divided by1_000_000to produce milliseconds.--allpath, which had the same issue.Test plan
netaudio --name <device> device config latencyreturns the correct latency valuenetaudio device config latency --allshows a table with a latency column for all devicesnetaudio --name <device> device config latency <value>(set) still works as before🤖 Generated with Claude Code