Skip to content

fix(sounds): keep a valid ttl_channel=0 instead of clobbering to default - #74

Merged
larsrollik merged 1 commit into
mainfrom
fix/sounds-ttl-channel-zero
Aug 13, 2026
Merged

fix(sounds): keep a valid ttl_channel=0 instead of clobbering to default#74
larsrollik merged 1 commit into
mainfrom
fix/sounds-ttl-channel-zero

Conversation

@larsrollik

Copy link
Copy Markdown
Member

StereoSound.__init__ used self.ttl_channel = ttl_channel or self.default_ttl_channel, so a caller passing the valid left-channel index 0 silently got the default (1). Select on None instead.

This also matters for the channel_mode="ttl" path just added (msw-core #73): it places the full-scale sync marker on ttl_channel, so ttl_channel=0 must be honoured.

Regression test added (test_ttl_channel_zero_is_not_clobbered_to_default).

StereoSound.__init__ set 'self.ttl_channel = ttl_channel or default', so a
caller passing the valid left-channel index 0 silently got the default (1).
Select on None instead. This also affects the new channel_mode='ttl' path,
which places the sync marker on ttl_channel.
@larsrollik
larsrollik requested a review from a team as a code owner August 13, 2026 14:16
@larsrollik
larsrollik merged commit c00a8d3 into main Aug 13, 2026
7 checks passed
@larsrollik
larsrollik deleted the fix/sounds-ttl-channel-zero branch August 13, 2026 14:20
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.

1 participant