You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unsure whether the fix is valid, considering it goes against the comment to always set WANT_WRITE.
I have tested with epoll in wsl, poll under windows and whatever my raspberry pi 3b+ on debian 12 uses and it seems to work
However my testing has not been extensive, and therefore I would like for some more confirmation as to whether this is valid.
I'm also unsure on the needs stop frames part, then again, the voice stuff is too much for me to all look at
And im unsure on whether the send_now branch should also need the same treatment with the socket update
I also want to look into whether update socket can be made more efficient by preventing the copy of the entire object each time
Code change checklist
I have ensured that all methods and functions are fully documented using doxygen style comments.
usyless
changed the title
Fix 100% busy main thread while bot is not playing audio in vc
fix: 100% busy main thread while bot is not playing audio in vc
Apr 29, 2026
I haven't really tested enough, so it'd be nice for others to test too to ensure it doesn't break random parts of voice, but sure that's fine as I've been using it with my two bots and not noticed any issue there
@Jaskowicz1 Here is a basic example main.cpp, its a bit cooked since i re-used the code from my other bot with a single server queue-based system but it has joining, leaving and playing (can also leave while playing reliably with no crash - im just using the pausing as an indicator of that here)
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
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.
I am unsure whether the fix is valid, considering it goes against the comment to always set WANT_WRITE.
I have tested with epoll in wsl, poll under windows and whatever my raspberry pi 3b+ on debian 12 uses and it seems to work
However my testing has not been extensive, and therefore I would like for some more confirmation as to whether this is valid.
I'm also unsure on the needs stop frames part, then again, the voice stuff is too much for me to all look at
And im unsure on whether the send_now branch should also need the same treatment with the socket update
I also want to look into whether update socket can be made more efficient by preventing the copy of the entire object each time
Code change checklist