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

Android: Device build_output_stream eventually stops working. #733

Closed
erikas-taroza opened this issue Dec 1, 2022 · 2 comments · Fixed by #741
Closed

Android: Device build_output_stream eventually stops working. #733

erikas-taroza opened this issue Dec 1, 2022 · 2 comments · Fixed by #741

Comments

@erikas-taroza
Copy link
Contributor

While testing on Android, I ran into an issue with calling build_output_stream. In my project, I use symphonia to decode audio files and cpal to produce sound. Every time I played a new file, I would call build_output_stream.

This would stop working after 40 calls of the method. This error is thrown.

I have created a workaround fix where I call build_output_stream only once. However, I am concerned with the StreamConfig changing between audio files. Is there anything that can be done in cpal to fix this issue?

I have created a project that reproduces this issue and I have included the workaround I made. You will need cargo-apk installed to run it.

@erikas-taroza
Copy link
Contributor Author

I found some related topics in the oboe-rs repo:
katyo/oboe-rs#45
katyo/oboe-rs#48

@erikas-taroza
Copy link
Contributor Author

This issue is fixed in oboe-rs but the changes have to be merged. For now, I created this fork that uses the fix:
https://github.com/erikas-taroza/cpal

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