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

error callback needed when stream is disconnected or fails #600

Closed
philburk opened this issue Jun 14, 2021 · 2 comments
Closed

error callback needed when stream is disconnected or fails #600

philburk opened this issue Jun 14, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@philburk
Copy link
Collaborator

PortAudio should be able to callback to the app if an internal error happens in a stream.
These errors would include disconnection events caused by unplugging headphones.

Something like the error callback in AAudio on Android.
https://developer.android.com/ndk/reference/group/audio#group___audio_1gaebf5b0cd3a30c257c6e66c037c229bab

Should the app be required to stop and/or close the stream after this callback? This has been a source of complex race conditions in AAudio.

@philburk philburk added the enhancement New feature or request label Jun 14, 2021
@RossBencina
Copy link
Collaborator

Possibly a duplicate of #143

We already have a callback when the stream finishes, if there was a way to indicate that an error happened that could possibly be reused.

Yes, StopStream should be called after a stream becomes inactive due to an error condition. We have a state machine that indicates when the stream should be stopped by the client, any async error reporting should be integrated with that.:

http://portaudio.com/docs/proposals/010-ClarifyStreamStateMachine.html

@philburk
Copy link
Collaborator Author

Yes, DUP of #143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants