libobs/UI: Stop using preprocessor directives for monitor
**Code Cleanup** Stop using preprocessor directives to determine if audio monitoring is supported. Use runtime function instead
This commit is contained in:
@@ -2269,7 +2269,9 @@ bool obs_set_audio_monitoring_device(const char *name, const char *id)
|
||||
if (!name || !id || !*name || !*id)
|
||||
return false;
|
||||
|
||||
#if defined(_WIN32) || HAVE_PULSEAUDIO || defined(__APPLE__)
|
||||
if (!obs_audio_monitoring_supported())
|
||||
return false;
|
||||
|
||||
pthread_mutex_lock(&obs->audio.monitoring_mutex);
|
||||
|
||||
if (strcmp(id, obs->audio.monitoring_device_id) == 0) {
|
||||
@@ -2290,9 +2292,6 @@ bool obs_set_audio_monitoring_device(const char *name, const char *id)
|
||||
|
||||
pthread_mutex_unlock(&obs->audio.monitoring_mutex);
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void obs_get_audio_monitoring_device(const char **name, const char **id)
|
||||
|
Reference in New Issue
Block a user