feat: report xrun via CallbackInfo instead of ErrorKind#1270
Merged
Conversation
…llbackInfo::xrun()
dee2ec7 to
3d8439b
Compare
Member
Author
|
cc @Decodetalkers for the duplex API improvement. |
Member
Author
|
As this one touches so many files, I'm gonna commit it and apply fixes as necessary later. |
Contributor
|
I haven't follow develop for a long time.. what is xrun for? I will start working on duplex for it. |
Member
Author
|
Sorry for the confusion, I meant to tag @gulbrand who has been working on the duplex API. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR came out of a Discord discussion with @BillyDM and @edwloef about where xrun status belongs.
Currently xruns are reported in the error callback, which have no ordering guarantee relative to the data callback. The issue with this is that for engines to skip forward to stay in sync with something else needs to know which data callback followed a glitch. That only works if the flag rides along with the data itself, not through a side channel.
RtAudio does the same thing.
With this PR:
ErrorKind::Xrunis gone in favor ofCallbackInfo::xrun().InputCallbackInfo/OutputCallbackInfoare unified intoCallbackInfo,InputStreamTimestamp/OutputStreamTimestampintoStreamTimestamp.DuplexCallbackInfois now{ input: CallbackInfo, output: CallbackInfo }.NoDatais now more accurately mapped toBackendErrorinstead of guessing it's an xrun.