Skip to content

Can a stream which is not "Started" call onAudioReady? #1226

Answered by philburk
ashfaq-opn asked this question in Q&A
Discussion options

You must be logged in to vote

You will not get an onAudioReady callback before you call stream->requestStart().
After requestStart() the stream will be in state Starting state then it will transition to Started state.
A callback can occur any time after requestStart().
It is possible for a callback to still be running after calling requestStop() because that is an asynchronous request.

Before any IO operation?

What kind of IO operation? You do not need to write the stream. Just fill the buffer in onAudioReady().
Generally you do not need to check the state. That is mostly for debugging.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@ashfaq-opn
Comment options

Answer selected by philburk
Comment options

You must be logged in to vote
1 reply
@ashfaq-opn
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants