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

Update cpal to current version in symphonia-play #221

Open
tobx opened this issue Aug 29, 2023 · 2 comments
Open

Update cpal to current version in symphonia-play #221

tobx opened this issue Aug 29, 2023 · 2 comments

Comments

@tobx
Copy link

tobx commented Aug 29, 2023

symphonia-play is using cpal = "0.13.3". The current version is cpal = "0.15.2". Updating cpal leads to errors here:

match config.sample_format() {

because cpal supports more sample formats now:
https://docs.rs/cpal/latest/cpal/enum.SampleFormat.html

I can easily adapt the code to use the other sample formats except i64 and u64 and as far as I understand that is because there is no implementation of RawSample for those.

What I do is return an error in those cases. I just started with audio programming so I am not really in a position to identify if this is an issue or not, but I thought I mention it here.

@pdeljanov
Copy link
Owner

Thanks for the heads up!

Returning an error seems like a reasonable solution for now. I don't think any consumer hardware would use those sample formats anyways.

However, cpal is a critical Rust audio crate, so we should probably consider adding those to Symphonia. Symphonia's SampleFormat is not marked at non-exhaustive though, so adding it without a semver bump could potentially cause breaks. So that part may have to wait.

@tobx
Copy link
Author

tobx commented Aug 30, 2023

Okay, thanks for the heads-up.

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

No branches or pull requests

2 participants