Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent notifs and scrshot from locking up when sink is locked #406

Conversation

serebit
Copy link
Member

@serebit serebit commented Jul 9, 2023

Description

The two cases are handled differently, as screenshots use gstreamer and notifs use canberra.

The screenshot sound now has a timeout of 2 seconds, after which it will cancel the attempt to play the sound and just move forward with the screenshot. This may cut off longer screenshot sounds, but it doesn't cut off the default.

The notif sounds are now launched as threads, so they don't block the main thread when queued up. This means that all buffered notif sounds will play upon the default sink being unlocked, but this is how all other sound players work, so it's not a big deal.

Submitter Checklist

  • Squashed commits with git rebase -i (if needed)
  • Built budgie-desktop and verified that the patch worked (if needed)

@serebit serebit added this to the 10.8 milestone Jul 9, 2023
@serebit serebit requested a review from a team July 9, 2023 17:52
@serebit serebit linked an issue Jul 9, 2023 that may be closed by this pull request
Copy link
Member

@JoshStrobl JoshStrobl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@JoshStrobl JoshStrobl force-pushed the 380-screenshots-and-notifications-fail-when-audio-sink-is-locked branch from 0dac881 to e47fe3a Compare July 10, 2023 13:45
@JoshStrobl JoshStrobl merged commit 2696249 into main Jul 10, 2023
1 check passed
@JoshStrobl JoshStrobl deleted the 380-screenshots-and-notifications-fail-when-audio-sink-is-locked branch July 10, 2023 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Screenshots and notifications fail when audio sink is 'locked'
2 participants