Skip to content

Conversation

@roderickvd
Copy link
Member

Since forever SampleRate has been a newtype pub struct SampleRate(pub u32) without offering any further type guarantees or functionality. On the contrary FrameCount and ChannelCount are just type aliases to some integer type.

This PR changes SampleRate to also be a type alias. While breaking, it'll be easier downstream.

@roderickvd
Copy link
Member Author

For yet another level in this discussion we could change these types to be NonZero.

@roderickvd roderickvd force-pushed the refactor/type-alias-sampleformat branch 3 times, most recently from b9584ba to 62fe86d Compare December 7, 2025 19:48
@roderickvd roderickvd force-pushed the refactor/type-alias-sampleformat branch from 62fe86d to f11ed67 Compare December 8, 2025 19:18
@roderickvd roderickvd merged commit b1382ba into master Dec 8, 2025
30 checks passed
@roderickvd roderickvd deleted the refactor/type-alias-sampleformat branch December 8, 2025 19:23
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