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

audio doesn't work after putting system to sleep #193

Closed
dwiel opened this issue Sep 10, 2020 · 11 comments
Closed

audio doesn't work after putting system to sleep #193

dwiel opened this issue Sep 10, 2020 · 11 comments

Comments

@dwiel
Copy link

dwiel commented Sep 10, 2020

When I put my computer to sleep, talon no longer recognizes popping noises. The only reliable way I can get it to work again is restarting talon. Is anything I can do to help debug and figure out what is going on? I put a print statement as the first line of a pop handler, and it isn't getting run.

@lunixbochs
Copy link

is this new? which talon version are you on?

@dwiel
Copy link
Author

dwiel commented Sep 10, 2020

Pretty sure its been this way since I started, but I've only got everything stable enough in the past few days to narrow down the cause.

v0.0.8.29-1482-gcb4e401 (1482)

@lunixbochs
Copy link

does it start working again if you manually switch mics in the talon menu?

@dwiel
Copy link
Author

dwiel commented Sep 10, 2020

Yeah that does the trick. It is infact still working, its just using the wrong mic. The menu bar says it is using "System Default (Sennheiser DECT)" but it isn't. it is using the builtin mic.

@lunixbochs
Copy link

Can you try 1488?

@dwiel
Copy link
Author

dwiel commented Sep 10, 2020

same issue with 1488

@lunixbochs
Copy link

Does it go away with 1488 if you manually change the mic before sleeping?

@lunixbochs
Copy link

I should probably stop / restart all audio streams on sleep / wake to fix this

@lunixbochs lunixbochs transferred this issue from talonvoice/beta Dec 27, 2020
@lunixbochs lunixbochs changed the title pop doesn't work after putting mac to sleep audio doesn't work after putting system to sleep Dec 27, 2020
@lunixbochs
Copy link

lunixbochs commented Dec 27, 2020

Need two things for this:

  1. Sleep/wake events on each OS.
    • macOS
    • Linux
    • Windows
  2. Wire these events up to re-initialize the audio system.

Linux: we need the d-bus signal PrepareForSleep. Some examples here: https://serverfault.com/questions/573379/system-suspend-dbus-upower-signals-are-not-seen

Windows: we need to listen to WM_POWERBROADCAST. Example here: https://forum.qt.io/topic/69485/do-an-operation-when-computer-goes-to-sleep

@lunixbochs lunixbochs added this to the v0.2.0 milestone Jan 7, 2021
@lunixbochs
Copy link

Should be fixed in beta v0.1.5-367, please confirm.

@lunixbochs
Copy link

confirmed by a few other folks, please reopen or file a new issue if you're still running into this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants