Skip to content

Commit d2971d1

Browse files
norihiroRytoEX
authored andcommitted
obs-filters: Remove unused functions when NvAFX is disabled
1 parent e9c4404 commit d2971d1

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,9 @@ static void noise_suppress_destroy(void *data)
236236
bfree(ng);
237237
}
238238

239+
#ifdef LIBNVAFX_ENABLED
239240
static bool nvafx_initialize_internal(void *data)
240241
{
241-
#ifdef LIBNVAFX_ENABLED
242242
struct noise_suppress_data *ng = data;
243243
NvAFX_Status err;
244244

@@ -320,16 +320,12 @@ static bool nvafx_initialize_internal(void *data)
320320
failure:
321321
ng->use_nvafx = false;
322322
return false;
323-
324-
#else
325-
UNUSED_PARAMETER(data);
326-
return false;
327-
#endif
328323
}
324+
#endif
329325

326+
#ifdef LIBNVAFX_ENABLED
330327
static void *nvafx_initialize(void *data)
331328
{
332-
#ifdef LIBNVAFX_ENABLED
333329
struct noise_suppress_data *ng = data;
334330
NvAFX_Status err;
335331

@@ -382,12 +378,8 @@ static void *nvafx_initialize(void *data)
382378
pthread_mutex_unlock(&nvafx_initializer_mutex);
383379
pthread_mutex_unlock(&ng->nvafx_mutex);
384380
return NULL;
385-
386-
#else
387-
UNUSED_PARAMETER(data);
388-
return NULL;
389-
#endif
390381
}
382+
#endif
391383

392384
static inline void alloc_channel(struct noise_suppress_data *ng,
393385
uint32_t sample_rate, size_t channel,

0 commit comments

Comments
 (0)