another attempt to fix our scratchy audio pipeline!#109
Draft
unknownpedestrian wants to merge 10 commits intomainfrom
Draft
another attempt to fix our scratchy audio pipeline!#109unknownpedestrian wants to merge 10 commits intomainfrom
unknownpedestrian wants to merge 10 commits intomainfrom
Conversation
…oops in health monitor - wrapped streamscrobbler in asyncio.to_thread to prevent event loop blocking from synchronous scrobbling calls - tell ffmpeg to ignore corrupt frames instead of attempting to correct them, which can cause long stalls and high CPU usage
make private_stream variable threadsafe in bot.py
CGillen
requested changes
Feb 22, 2026
Owner
CGillen
left a comment
There was a problem hiding this comment.
Otherwise, I don't think the sleeps are necessary, but we're dealing with audio, so who knows
bot.py
Outdated
Comment on lines
1048
to
1050
| max_attempts = 10 | ||
| attempts = 0 | ||
| while voice_client.is_playing() and attempts < max_attempts: |
Owner
There was a problem hiding this comment.
for i in range(attempts):
will get you a cleaner way to loop for attempts number times. Then you can use
if i+1 == attempts: to see if you're on the last loop
Collaborator
Author
There was a problem hiding this comment.
do you have an example?? or a link to the documentation for that? brain kinda slow today
also do I need to remove any of them sleeps?
Collaborator
Author
There was a problem hiding this comment.
I think I got it, pull updated!
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.
-
added attempt limit in stop_playback Function to prevent infinite loops in health monitor (might break checks later in pipeline)wrapped streamscrobbler in asyncio.to_thread to prevent event loop blocking from synchronous scrobbling calls
tell ffmpeg to ignore corrupt frames instead of attempting to correct them
added output buffer (after transcode)
link validator added to pls_parser module
Private_stream variable threaded workaround (since streamscrobbler is threaded now)
fix awaits in maint command (slower now, on purpose)
fix tls_verify Boolean
configured env vars to logger on_ready (even when defaults are set!)
Make bot come in deafened
Tidy up ffmpeg vars
Re-did attempt limit "the Python Way" ♥ (still might break things further down the pipeline!)
expanded env configurability
updated example env + comments!