aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends')
-rw-r--r--Alc/backends/pulseaudio.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/Alc/backends/pulseaudio.cpp b/Alc/backends/pulseaudio.cpp
index e2845032..2a2de2a6 100644
--- a/Alc/backends/pulseaudio.cpp
+++ b/Alc/backends/pulseaudio.cpp
@@ -406,17 +406,15 @@ void wait_for_operation(pa_operation *op, pa_threaded_mainloop *loop)
pa_context *connect_context(pa_threaded_mainloop *loop, ALboolean silent)
{
const char *name{"OpenAL Soft"};
- al_string binname{AL_STRING_INIT_STATIC()};
- GetProcBinary(nullptr, &binname);
- if(!alstr_empty(binname))
- name = alstr_get_cstr(binname);
+ PathNamePair binname = GetProcBinary();
+ if(!binname.fname.empty())
+ name = binname.fname.c_str();
pa_context *context{pa_context_new(pa_threaded_mainloop_get_api(loop), name)};
if(!context)
{
ERR("pa_context_new() failed\n");
- alstr_reset(&binname);
return nullptr;
}
@@ -448,7 +446,6 @@ pa_context *connect_context(pa_threaded_mainloop *loop, ALboolean silent)
context = nullptr;
}
- alstr_reset(&binname);
return context;
}