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:
tt2468
2021-08-31 04:53:02 -07:00
committed by Jim
parent 6e9644ec15
commit ff22897d68
6 changed files with 92 additions and 87 deletions

View File

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