Skip to content

SarAsio: never reuse an endpoint ID for a new endpoint (#15, #66) - #151

Draft
eiz-claude wants to merge 2 commits into
mack/fix-54-stereo-without-interfacefrom
mack/fix-15-unique-endpoint-ids
Draft

eiz-claude wants to merge 2 commits into
mack/fix-54-stereo-without-interfacefrom
mack/fix-15-unique-endpoint-ids

Conversation

@eiz-claude

@eiz-claude eiz-claude commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #15, fixes #66.

The control panel gave each new endpoint the lowest unused ep_N. After a user deleted an endpoint, the next one added got the deleted one's ID, and Windows kept showing the old name for it. Windows stores an endpoint's name, and the user's settings for it, under the device interface derived from that ID. The same thing happened after a reinstall with a fresh configuration, where numbering starts over (#66). In #66, a commenter found that changing the id in default.json to an unused value fixes it.

New endpoints now get an ID made from a fresh GUID (ep_ plus 32 hex digits, under the driver's 63-character limit). If CoCreateGuid fails, it falls back to the old counter. Existing endpoints keep their IDs, so nothing changes for current configurations. This doesn't repair names Windows has already cached for reused IDs; those can be renamed in the Sound control panel.

Test

New SarTest endpoint-names check (issue-15-endpoint-names scenario). It runs a host with an endpoint pair named "SarTest Alpha", renames it to "SarTest Beta" keeping the IDs, then gives it new IDs, and records what Windows shows each time:

test VM, both builds name Windows shows
original IDs, "Alpha" Alpha
same IDs, renamed "Beta" Alpha (reusedIdShowsOldName: true)
new IDs, "Beta" Beta

That confirms the cause. The check fails only if new IDs don't get the new name. The UI change itself (GUID IDs from Add endpoint) isn't driven by the harness.

🤖 Generated with Claude Code

eiz and others added 2 commits October 3, 2026 10:45
Adds SarTest endpoint-names and an issue-15-endpoint-names scenario.
It runs a host with an endpoint pair, renames it keeping the IDs, then
gives it new IDs, and records which name Windows shows each time. It
fails unless the new IDs show the new name. Layouts get an ID prefix
separate from the name prefix for this.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The control panel gave a new endpoint the lowest unused "ep_N", so
after deleting an endpoint the next one added got its ID. Windows keeps
an endpoint's name and settings under that ID, so it kept showing the
deleted endpoint's name for the new one (and the same after a
reinstall, where numbering starts over). New endpoints now get an ID
made from a fresh GUID; the counter remains as a fallback if
CoCreateGuid fails. Existing endpoints keep their IDs.

Fixes #15, fixes #66.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eiz-claude
eiz-claude added this pull request to stack #154 October 3, 2026 15:01
@eiz-claude eiz-claude changed the title mack/fix 15 unique endpoint ids SarAsio: never reuse an endpoint ID for a new endpoint (#15, #66) Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants