feat(audio): lazy stream close for bluetooth mic latency#747
Open
VirenMohindra wants to merge 1 commit intocjpais:mainfrom
Open
feat(audio): lazy stream close for bluetooth mic latency#747VirenMohindra wants to merge 1 commit intocjpais:mainfrom
VirenMohindra wants to merge 1 commit intocjpais:mainfrom
Conversation
keep the mic stream warm for 30s after recording ends in OnDemand mode instead of closing immediately. eliminates bluetooth device negotiation latency (500-1400ms) for all recordings after the first one. uses a generation counter so only the most recent timer thread actually closes the stream — rapid record/stop cycles stay warm throughout.
9a0344c to
07fe20c
Compare
Owner
|
Does this cause audio issues with other applications? That's the main concern I have with this. Cause we're kind of holding a resource that we're not actively using, and I suspect that there could be conflicts with other applications who might try to gain that resource potentially like during video calls or other things. Like I know the audio stuff on Mac OS is pretty weird. And we might just need to ultimately write a better set of drivers for Mac OS to solve this problem at the root level, rather than making patches to the application. |
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.
Before Submitting This PR
Please confirm you have done the following:
Human Written Description
CoreAudiodevice negotiationOnDemandmode instead of closing immediately, eliminating that latency for all recordings after the first oneRelated Issues/Discussions
Testing
AI Assistance
If AI was used:
Screenshots