1
0
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:
Jfreegman
2014-09-24 15:15:07 -04:00
parent a432d733d7
commit 00cccad22c
4 changed files with 11 additions and 11 deletions

View File

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