mirror of
https://github.com/Tha14/toxic.git
synced 2025-12-07 15:36:35 +01:00
a few general fixes
This commit is contained in:
15
src/device.c
15
src/device.c
@@ -102,9 +102,7 @@ DeviceError init_devices()
|
||||
#endif /* AUDIO */
|
||||
{
|
||||
const char *stringed_device_list;
|
||||
|
||||
|
||||
|
||||
|
||||
size[input] = 0;
|
||||
if ( (stringed_device_list = alcGetString(NULL, ALC_CAPTURE_DEVICE_SPECIFIER)) ) {
|
||||
ddevice_names[input] = alcGetString(NULL, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER);
|
||||
@@ -115,8 +113,6 @@ DeviceError init_devices()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
size[output] = 0;
|
||||
if ( (stringed_device_list = alcGetString(NULL, ALC_DEVICE_SPECIFIER)) ) {
|
||||
ddevice_names[output] = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
|
||||
@@ -128,7 +124,6 @@ DeviceError init_devices()
|
||||
}
|
||||
|
||||
// Start poll thread
|
||||
|
||||
if (pthread_mutex_init(&mutex, NULL) != 0)
|
||||
return de_InternalError;
|
||||
|
||||
@@ -242,8 +237,10 @@ DeviceError open_device(DeviceType type, int32_t selection, uint32_t* device_idx
|
||||
}
|
||||
device->ref_count++;
|
||||
|
||||
if (pthread_mutex_init(device->mutex, NULL) != 0)
|
||||
if (pthread_mutex_init(device->mutex, NULL) != 0) {
|
||||
unlock;
|
||||
return de_InternalError;
|
||||
}
|
||||
|
||||
unlock;
|
||||
return de_None;
|
||||
@@ -296,8 +293,10 @@ DeviceError open_device(DeviceType type, int32_t selection, uint32_t* device_idx
|
||||
thread_paused = false;
|
||||
}
|
||||
|
||||
if (pthread_mutex_init(device->mutex, NULL) != 0)
|
||||
if (pthread_mutex_init(device->mutex, NULL) != 0) {
|
||||
unlock;
|
||||
return de_InternalError;
|
||||
}
|
||||
|
||||
unlock;
|
||||
return de_None;
|
||||
|
||||
Reference in New Issue
Block a user