aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/pulseaudio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alc/backends/pulseaudio.cpp')
-rw-r--r--alc/backends/pulseaudio.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/alc/backends/pulseaudio.cpp b/alc/backends/pulseaudio.cpp
index e40204f5..102e3915 100644
--- a/alc/backends/pulseaudio.cpp
+++ b/alc/backends/pulseaudio.cpp
@@ -1501,14 +1501,16 @@ bool PulseBackendFactory::init()
bool PulseBackendFactory::querySupport(BackendType type)
{ return type == BackendType::Playback || type == BackendType::Capture; }
-void PulseBackendFactory::probe(DevProbe type, std::string *outnames)
+std::string PulseBackendFactory::probe(DevProbe type)
{
- auto add_device = [outnames](const DevMap &entry) -> void
+ std::string outnames;
+
+ auto add_device = [&outnames](const DevMap &entry) -> void
{
/* +1 to also append the null char (to ensure a null-separated list and
* double-null terminated list).
*/
- outnames->append(entry.name.c_str(), entry.name.length()+1);
+ outnames.append(entry.name.c_str(), entry.name.length()+1);
};
switch(type)
@@ -1523,6 +1525,8 @@ void PulseBackendFactory::probe(DevProbe type, std::string *outnames)
std::for_each(CaptureDevices.cbegin(), CaptureDevices.cend(), add_device);
break;
}
+
+ return outnames;
}
BackendPtr PulseBackendFactory::createBackend(ALCdevice *device, BackendType type)