Reduce some indentation
This commit is contained in:
parent
ed2e456dfb
commit
16aa3ab196
33
Alc/alc.cpp
33
Alc/alc.cpp
@ -4315,27 +4315,27 @@ ALC_API void ALC_APIENTRY alcDeviceResumeSOFT(ALCdevice *device)
|
||||
{
|
||||
DeviceRef dev{VerifyDevice(device)};
|
||||
if(!dev || dev->Type != Playback)
|
||||
{
|
||||
alcSetError(dev.get(), ALC_INVALID_DEVICE);
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> _{dev->BackendLock};
|
||||
if((dev->Flags&DEVICE_PAUSED))
|
||||
{
|
||||
if(!(dev->Flags&DEVICE_PAUSED))
|
||||
return;
|
||||
dev->Flags &= ~DEVICE_PAUSED;
|
||||
if(dev->ContextList.load() != nullptr)
|
||||
{
|
||||
if(V0(dev->Backend,start)() != ALC_FALSE)
|
||||
dev->Flags |= DEVICE_RUNNING;
|
||||
else
|
||||
if(dev->ContextList.load() == nullptr)
|
||||
return;
|
||||
|
||||
if(V0(dev->Backend,start)() == ALC_FALSE)
|
||||
{
|
||||
V0(dev->Backend,lock)();
|
||||
aluHandleDisconnect(dev.get(), "Device start failure");
|
||||
V0(dev->Backend,unlock)();
|
||||
alcSetError(dev.get(), ALC_INVALID_DEVICE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
dev->Flags |= DEVICE_RUNNING;
|
||||
}
|
||||
|
||||
|
||||
@ -4382,14 +4382,12 @@ ALC_API ALCboolean ALC_APIENTRY alcResetDeviceSOFT(ALCdevice *device, const ALCi
|
||||
alcSetError(dev.get(), ALC_INVALID_DEVICE);
|
||||
return ALC_FALSE;
|
||||
}
|
||||
std::unique_lock<std::mutex> backlock{dev->BackendLock};
|
||||
std::lock_guard<std::mutex> _{dev->BackendLock};
|
||||
listlock.unlock();
|
||||
|
||||
ALCenum err{UpdateDeviceParams(dev.get(), attribs)};
|
||||
backlock.unlock();
|
||||
if(LIKELY(err == ALC_NO_ERROR)) return ALC_TRUE;
|
||||
|
||||
if(err != ALC_NO_ERROR)
|
||||
{
|
||||
alcSetError(dev.get(), err);
|
||||
if(err == ALC_INVALID_DEVICE)
|
||||
{
|
||||
@ -4399,6 +4397,3 @@ ALC_API ALCboolean ALC_APIENTRY alcResetDeviceSOFT(ALCdevice *device, const ALCi
|
||||
}
|
||||
return ALC_FALSE;
|
||||
}
|
||||
|
||||
return ALC_TRUE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user