Remove a couple unneeded variables
This commit is contained in:
parent
b3645df56f
commit
b40aa8636b
20
Alc/ALc.c
20
Alc/ALc.c
@ -1630,7 +1630,6 @@ static ALCvoid FreeContext(ALCcontext *context)
|
|||||||
// This should probably move to another c file but for now ...
|
// This should probably move to another c file but for now ...
|
||||||
ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName, ALCuint frequency, ALCenum format, ALCsizei SampleSize)
|
ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName, ALCuint frequency, ALCenum format, ALCsizei SampleSize)
|
||||||
{
|
{
|
||||||
ALCboolean DeviceFound = ALC_FALSE;
|
|
||||||
ALCdevice *device = NULL;
|
ALCdevice *device = NULL;
|
||||||
|
|
||||||
DO_INITCONFIG();
|
DO_INITCONFIG();
|
||||||
@ -1686,18 +1685,15 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName,
|
|||||||
device->next = g_pDeviceList;
|
device->next = g_pDeviceList;
|
||||||
g_pDeviceList = device;
|
g_pDeviceList = device;
|
||||||
g_ulDeviceCount++;
|
g_ulDeviceCount++;
|
||||||
|
|
||||||
DeviceFound = ALC_TRUE;
|
|
||||||
}
|
}
|
||||||
UnlockLists();
|
else
|
||||||
|
|
||||||
if(!DeviceFound)
|
|
||||||
{
|
{
|
||||||
alcSetError(NULL, ALC_INVALID_VALUE);
|
|
||||||
DeleteCriticalSection(&device->Mutex);
|
DeleteCriticalSection(&device->Mutex);
|
||||||
free(device);
|
free(device);
|
||||||
device = NULL;
|
device = NULL;
|
||||||
|
alcSetError(NULL, ALC_INVALID_VALUE);
|
||||||
}
|
}
|
||||||
|
UnlockLists();
|
||||||
|
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
@ -2691,7 +2687,6 @@ static void GetFormatFromString(const char *str, enum DevFmtChannels *chans, enu
|
|||||||
*/
|
*/
|
||||||
ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
|
ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
|
||||||
{
|
{
|
||||||
ALboolean bDeviceFound = AL_FALSE;
|
|
||||||
const ALCchar *fmt;
|
const ALCchar *fmt;
|
||||||
ALCdevice *device;
|
ALCdevice *device;
|
||||||
|
|
||||||
@ -2776,19 +2771,16 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
|
|||||||
device->next = g_pDeviceList;
|
device->next = g_pDeviceList;
|
||||||
g_pDeviceList = device;
|
g_pDeviceList = device;
|
||||||
g_ulDeviceCount++;
|
g_ulDeviceCount++;
|
||||||
|
|
||||||
bDeviceFound = AL_TRUE;
|
|
||||||
}
|
}
|
||||||
UnlockLists();
|
else
|
||||||
|
|
||||||
if(!bDeviceFound)
|
|
||||||
{
|
{
|
||||||
// No suitable output device found
|
// No suitable output device found
|
||||||
alcSetError(NULL, ALC_INVALID_VALUE);
|
|
||||||
DeleteCriticalSection(&device->Mutex);
|
DeleteCriticalSection(&device->Mutex);
|
||||||
free(device);
|
free(device);
|
||||||
device = NULL;
|
device = NULL;
|
||||||
|
alcSetError(NULL, ALC_INVALID_VALUE);
|
||||||
}
|
}
|
||||||
|
UnlockLists();
|
||||||
|
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user