-
Notifications
You must be signed in to change notification settings - Fork 221
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
When using ALSA backend Voice doesn't call drop after termination #73
Comments
After #72 examples don't panic anymore when run on my system, but the sound doesn't play properly, it plays for a few moments and then cuts off. I suspect it is caused by the same problem which caused the panics. |
#72 considerably changed the code, so I'm not sure that the two problems are related. |
I think the new problem is caused by the fact that we immediately drop the cpal voice and stream at creation. This looks like a stupid mistake, but it makes me wonder why it's working for me then. Anyway, may be fixed by storing the |
Closing this, since panic seems to be fixed and the problem I am experiencing with sound not playing properly with ALSA backend is most likely caused by RustAudio/cpal#142. |
I have added a println in
Voice::drop
like this:And used modified cpal version in rodio like this:
When running any rodio example line "Voice droped." isn't printed, and the next time I run the example it panics with:
If
Voice
is properly dropped it doesn't panic and also it doesn't panic when some other process is playing sound.I have encountered the same problem with
cpal/examples/beep.rs
example.The text was updated successfully, but these errors were encountered: