diff options
author | Chris Robinson <[email protected]> | 2018-12-29 02:21:53 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-29 02:21:53 -0800 |
commit | 63fc74beaac497d35bd74cb202e3f4ffb2dbe7fb (patch) | |
tree | 9c3000932649cc6bc84a58695f3aa95d40a64e07 /Alc | |
parent | 71a4d6db6f88cbb735cd959b3dd16d83a27474cf (diff) |
Don't bother with an explicit Loopback backend type
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/alc.cpp | 2 | ||||
-rw-r--r-- | Alc/backends/base.h | 3 | ||||
-rw-r--r-- | Alc/backends/loopback.cpp | 12 |
3 files changed, 6 insertions, 11 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 517e98d3..167ee3e6 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -4094,7 +4094,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceN device->NumMonoSources = device->SourcesMax - device->NumStereoSources; device->Backend = LoopbackBackendFactory::getFactory().createBackend(device.get(), - BackendType::Loopback); + BackendType::Playback); if(!device->Backend) { device = nullptr; diff --git a/Alc/backends/base.h b/Alc/backends/base.h index 0b9803a2..0b3b24fb 100644 --- a/Alc/backends/base.h +++ b/Alc/backends/base.h @@ -58,8 +58,7 @@ using BackendPtr = std::unique_ptr<BackendBase>; enum class BackendType { Playback, - Capture, - Loopback + Capture }; diff --git a/Alc/backends/loopback.cpp b/Alc/backends/loopback.cpp index 6404d413..5d133d8e 100644 --- a/Alc/backends/loopback.cpp +++ b/Alc/backends/loopback.cpp @@ -64,18 +64,14 @@ void LoopbackBackend::stop() bool LoopbackBackendFactory::init() { return true; } -bool LoopbackBackendFactory::querySupport(BackendType type) -{ return (type == BackendType::Loopback); } +bool LoopbackBackendFactory::querySupport(BackendType UNUSED(type)) +{ return true; } void LoopbackBackendFactory::probe(DevProbe, std::string*) { } -BackendPtr LoopbackBackendFactory::createBackend(ALCdevice *device, BackendType type) -{ - if(type == BackendType::Loopback) - return BackendPtr{new LoopbackBackend{device}}; - return nullptr; -} +BackendPtr LoopbackBackendFactory::createBackend(ALCdevice *device, BackendType UNUSED(type)) +{ return BackendPtr{new LoopbackBackend{device}}; } BackendFactory &LoopbackBackendFactory::getFactory() { |