aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/pulseaudio.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-11 16:09:24 -0800
committerChris Robinson <[email protected]>2018-11-11 16:09:24 -0800
commit4793e5c4ae3472b1f931ec48f913614710a6d12c (patch)
treee71270203ab9a2353b47e84a7d23eef9453375e9 /Alc/backends/pulseaudio.cpp
parent58a71a1a00b2cbacd00679f9136233dae23a7ca7 (diff)
Use C++ for GetProcBinary
Diffstat (limited to 'Alc/backends/pulseaudio.cpp')
-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;
}