Don't bother with an explicit Loopback backend type

This commit is contained in:
Chris Robinson 2018-12-29 02:21:53 -08:00
parent 71a4d6db6f
commit 63fc74beaa
3 changed files with 6 additions and 11 deletions

View File

@ -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;

View File

@ -58,8 +58,7 @@ using BackendPtr = std::unique_ptr<BackendBase>;
enum class BackendType {
Playback,
Capture,
Loopback
Capture
};

View File

@ -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()
{