aboutsummaryrefslogtreecommitdiffstats
path: root/pulse.cc
diff options
context:
space:
mode:
authorSimon Gomizelj <simongmzlj@gmail.com>2013-04-08 15:11:58 -0400
committerSimon Gomizelj <simongmzlj@gmail.com>2013-04-08 15:11:58 -0400
commitebf3e562f93e9eed82aeae22b673513fc6c90689 (patch)
tree09c83c297567e2fea4568fc0869e251afa5a9fe2 /pulse.cc
parentaf38a7762b23a950618801ca8d8bbfec87bb02a7 (diff)
downloadmirror-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>
Diffstat (limited to 'pulse.cc')
-rw-r--r--pulse.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/pulse.cc b/pulse.cc
index 7f05bf6..e9cd28a 100644
--- a/pulse.cc
+++ b/pulse.cc
@@ -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);
}