diff options
author | Simon Gomizelj <simongmzlj@gmail.com> | 2013-04-08 15:11:58 -0400 |
---|---|---|
committer | Simon Gomizelj <simongmzlj@gmail.com> | 2013-04-08 15:11:58 -0400 |
commit | ebf3e562f93e9eed82aeae22b673513fc6c90689 (patch) | |
tree | 09c83c297567e2fea4568fc0869e251afa5a9fe2 | |
parent | af38a7762b23a950618801ca8d8bbfec87bb02a7 (diff) | |
download | mirror-ponymix-ebf3e562f93e9eed82aeae22b673513fc6c90689.tar.gz mirror-ponymix-ebf3e562f93e9eed82aeae22b673513fc6c90689.tar.bz2 mirror-ponymix-ebf3e562f93e9eed82aeae22b673513fc6c90689.zip |
Don't connect with PA_CONTEXT_NOFAIL
NOFAIL means we don't fail if the daemon is not available when
pa_context_connect() is called and instead enter PA_CONTEXT_CONNECTING
state and wait for the daemon to appear.
So currently if pulseaudio isn't running or available, ponymix will just
block and wait. Since a lot of people use ponymix bound to their volume
keys, this could potentially mean spawning 100s of processes before
actually catching on that things aren't working.
PA_CONTEXT_NOFLAGS was introduced in 0.9.19. Its really just 0.
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com>
-rw-r--r-- | pulse.cc | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -114,7 +114,7 @@ PulseClient::PulseClient(string client_name) : pa_proplist_free(proplist); pa_context_set_state_callback(context_, connect_state_cb, &state); - pa_context_connect(context_, nullptr, PA_CONTEXT_NOFAIL, nullptr); + pa_context_connect(context_, nullptr, PA_CONTEXT_NOFLAGS, nullptr); while (state != PA_CONTEXT_READY && state != PA_CONTEXT_FAILED) { pa_mainloop_iterate(mainloop_, 1, nullptr); } |