Don't bother with an explicit Loopback backend type
This commit is contained in:
parent
71a4d6db6f
commit
63fc74beaa
@ -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;
|
||||
|
@ -58,8 +58,7 @@ using BackendPtr = std::unique_ptr<BackendBase>;
|
||||
|
||||
enum class BackendType {
|
||||
Playback,
|
||||
Capture,
|
||||
Loopback
|
||||
Capture
|
||||
};
|
||||
|
||||
|
||||
|
@ -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()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user