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

Restarting the stream when receiving OnError* #256

Closed
lukaszkozakiewicz opened this issue Oct 31, 2018 · 2 comments
Closed

Restarting the stream when receiving OnError* #256

lukaszkozakiewicz opened this issue Oct 31, 2018 · 2 comments
Assignees

Comments

@lukaszkozakiewicz
Copy link

Hey,

The full Oboe guide in https://github.com/google/oboe/blob/c5c3cc17f78974bf005bf33a2de1a093ac55cc07/docs/FullGuide.md says:

The onError*() methods should check the state of the stream as shown in the following example. You should not close or reopen the stream from the callback, use another thread instead.

On the other hand,

* in this method. There is no need to create a new thread.
in hello-oboe sample says there is no need to create a new thread to restart a stream. I can see that onError*() callbacks are invoked on a different (worker?) thread from onAudioReady() which would suggest one can restart the stream without creating a dedicated thread, at least on Android 8.1. So which one is true?

@philburk
Copy link
Collaborator

philburk commented Nov 4, 2018

Thanks. Proposed fix here:
#261

@lukaszkozakiewicz
Copy link
Author

Looks great, thanks!

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

3 participants