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

Force stop when closing a stream under a single lock #961

Closed
philburk opened this issue Jul 27, 2020 · 0 comments · Fixed by #1017
Closed

Force stop when closing a stream under a single lock #961

philburk opened this issue Jul 27, 2020 · 0 comments · Fixed by #1017
Assignees
Labels
P1 high priority
Milestone

Comments

@philburk
Copy link
Collaborator

If a legacy AAudio stream is not stopped then a data callback, and possibly an error callback, can occur after the stream has been closed and deleted. This is more likely to occur when a routing change is occurring.

In Oboe, we can force a stop from the close() method under a lock.

See description of the race condition that can occur here

@philburk philburk self-assigned this Jul 27, 2020
@philburk philburk added this to the v1.5 milestone Jul 27, 2020
@philburk philburk added the P1 high priority label Sep 16, 2020
philburk added a commit that referenced this issue Sep 18, 2020
This will give the callback threads time to exit
before the stream is destroyed and will help avoid
some race conditions inside AAudio and AudioFlinger.

Fixes #961
philburk added a commit that referenced this issue Sep 23, 2020
This will give the callback threads time to exit
before the stream is destroyed and will help avoid
some race conditions inside AAudio and AudioFlinger.

Fixes #961
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 high priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant