Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use usize everywhere #26

Closed
GWBasic opened this issue Feb 20, 2023 · 0 comments · Fixed by #27
Closed

Use usize everywhere #26

GWBasic opened this issue Feb 20, 2023 · 0 comments · Fixed by #27

Comments

@GWBasic
Copy link
Owner

GWBasic commented Feb 20, 2023

In Rust, indexing of arrays and general sizes are typically represented by a usize.

wave_stream currently uses a u32, because the wave header uses u32.

Initially, I believed it was best to keep with the type limitations imposed by the wave format. Instead, I believe it's simpler to keep with Rust semantics for indicating size and location; and have a runtime exception if the wave file is longer than u32::MAX;

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 a pull request may close this issue.

1 participant