1
0
Эх сурвалжийг харах

obs-filters: Minor NVAFX cleanup

Remove some unused variables, fix incorrect mutex initializer, fix
exporting NVAFX functions via dllexport.
Richard Stanway 4 жил өмнө
parent
commit
5d54cc36a7

+ 5 - 5
plugins/obs-filters/noise-suppress-filter.c

@@ -516,7 +516,7 @@ bool load_nvafx(void)
 		return false;
 	}
 
-	pthread_mutex_init(&nvafx_initializer_mutex, PTHREAD_MUTEX_DEFAULT);
+	pthread_mutex_init(&nvafx_initializer_mutex, NULL);
 
 #define LOAD_SYM_FROM_LIB(sym, lib, dll)                                   \
 	if (!(sym = (sym##_t)GetProcAddress(lib, #sym))) {                 \
@@ -601,7 +601,7 @@ static void *noise_suppress_create(obs_data_t *settings, obs_source_t *filter)
 		ng->nvafx_initialized = false;
 		ng->nvafx_loading = false;
 
-		pthread_mutex_init(&ng->nvafx_mutex, PTHREAD_MUTEX_DEFAULT);
+		pthread_mutex_init(&ng->nvafx_mutex, NULL);
 
 		info("NVAFX SDK redist path was found here %s", sdk_path);
 	}
@@ -1004,9 +1004,9 @@ static obs_properties_t *noise_suppress_properties(void *data)
 #endif
 
 #ifdef LIBNVAFX_ENABLED
-	obs_property_t *nvafx_slider = obs_properties_add_float_slider(
-		ppts, S_NVAFX_INTENSITY, TEXT_NVAFX_INTENSITY, 0.0f, 1.0f,
-		0.01f);
+	obs_properties_add_float_slider(ppts, S_NVAFX_INTENSITY,
+					TEXT_NVAFX_INTENSITY, 0.0f, 1.0f,
+					0.01f);
 
 	if (!nvafx_loaded) {
 		obs_property_list_item_disable(method, 2, true);

+ 1 - 1
plugins/obs-filters/nvafx-load.h

@@ -5,7 +5,7 @@
 #include <stdint.h>
 #include <util/platform.h>
 
-#define NVAFX_API __declspec(dllexport)
+#define NVAFX_API
 
 #ifdef LIBNVAFX_ENABLED
 static HMODULE nv_audiofx = NULL;