fix(sounds): keep a valid ttl_channel=0 instead of clobbering to default - #74
Merged
Conversation
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.
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.
StereoSound.__init__usedself.ttl_channel = ttl_channel or self.default_ttl_channel, so a caller passing the valid left-channel index0silently got the default (1). Select onNoneinstead.This also matters for the
channel_mode="ttl"path just added (msw-core #73): it places the full-scale sync marker onttl_channel, sottl_channel=0must be honoured.Regression test added (
test_ttl_channel_zero_is_not_clobbered_to_default).