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

Stream API is unsound #186

Open
glowcoil opened this issue Apr 20, 2021 · 1 comment
Open

Stream API is unsound #186

glowcoil opened this issue Apr 20, 2021 · 1 comment

Comments

@glowcoil
Copy link
Member

The callback is passed a 'static reference to the audio buffer (here and here; also see Output and Duplex), which allows the reference to outlive the duration of the callback. The lifetime of the buffer should be appropriately constrained to the duration of the callback.

@forslund
Copy link

I think I ran into this when trying to send the buffer over a channel: https://github.com/forslund/rust-recorder/blob/ea1256907b9b27987385288f4ced362111b4c170/src/main.rs

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