aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/coreaudio.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-03-30 15:37:41 -0700
committerChris Robinson <[email protected]>2020-03-30 15:37:41 -0700
commitf2ddf971df5cbbd112e0d677b0ea5bd6368051dc (patch)
tree8142af1d3cde52f61c30d88951aeff00cb3f2b39 /alc/backends/coreaudio.cpp
parent167bdce48d1656569cf63448fc2328800288c38f (diff)
Return the enumerated device names from the backend
Rather than using an out parameter.
Diffstat (limited to 'alc/backends/coreaudio.cpp')
-rw-r--r--alc/backends/coreaudio.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/alc/backends/coreaudio.cpp b/alc/backends/coreaudio.cpp
index 5570b716..56520641 100644
--- a/alc/backends/coreaudio.cpp
+++ b/alc/backends/coreaudio.cpp
@@ -637,16 +637,18 @@ bool CoreAudioBackendFactory::init() { return true; }
bool CoreAudioBackendFactory::querySupport(BackendType type)
{ return type == BackendType::Playback || type == BackendType::Capture; }
-void CoreAudioBackendFactory::probe(DevProbe type, std::string *outnames)
+std::string CoreAudioBackendFactory::probe(DevProbe type)
{
+ std::string outnames;
switch(type)
{
- case DevProbe::Playback:
- case DevProbe::Capture:
- /* Includes null char. */
- outnames->append(ca_device, sizeof(ca_device));
- break;
+ case DevProbe::Playback:
+ case DevProbe::Capture:
+ /* Includes null char. */
+ outnames.append(ca_device, sizeof(ca_device));
+ break;
}
+ return outnames;
}
BackendPtr CoreAudioBackendFactory::createBackend(ALCdevice *device, BackendType type)