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

disable sound if pulseaudio server is not reachable #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tirolerstefan
Copy link

@tirolerstefan tirolerstefan commented Aug 1, 2019

In my configuration with no installed pulse audio server, the following import triggered no exception:

(app.py ~ line 90)

        if prefs.sound:
            try:
                from kazam.pulseaudio.pulseaudio import pulseaudio_q
                prefs.sound = True
            except:
                logger.warning("Pulse Audio Failed to load. Sound recording disabled.")
                prefs.sound = False

but the connection to the sound server failed here:

(app.py ~ line 120)

        if prefs.sound:
            prefs.pa_q = pulseaudio_q()
            prefs.pa_q.start()

Solved this by putting above lines in a try-except block and disabled sound on exception. works!

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

Successfully merging this pull request may close these issues.

1 participant