-
Notifications
You must be signed in to change notification settings - Fork 582
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
Thread safety gaps in AudioStreamAAudio #1180
Comments
These may be called from a callback. A lock could hang the join() from the close(). |
A proper solution for real-time audio requires that the get() methods use a std::shared_mutex, which is C++17. |
philburk
added a commit
that referenced
this issue
Feb 25, 2021
Protect native stream pointer with a shared_lock. The race may have never ended badly. But it was theoretically possible. So this prevents it. Note that this requires that Oboe be built with C++17. But apps can still use C++14. Fixes #1180
philburk
added a commit
that referenced
this issue
Feb 25, 2021
Protect native stream pointer with a shared_lock. The race may have never ended badly. But it was theoretically possible. So this prevents it. Note that this requires that Oboe be built with C++17. But apps can still use C++14. Fixes #1180
philburk
added a commit
that referenced
this issue
Mar 9, 2021
* oboe: fix possible race on close Protect native stream pointer with a shared_lock. The race may have never ended badly. But it was theoretically possible. So this prevents it. Note that this requires that Oboe be built with C++17. But apps can still use C++14. Fixes #1180 * Add some comments about the DEBUG code.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are numerous method, eg. getTimestamp(), that reference the underlying native audio stream.
But that stream could get closed by an AAudio error callback that happened simultaneously.
We need to lock around references to mAAudioStream.
The text was updated successfully, but these errors were encountered: