Skip to content

Commit

Permalink
Add optional RNNoise support to AudioBridge (#3185)
Browse files Browse the repository at this point in the history
  • Loading branch information
lminiero authored Apr 8, 2024
1 parent 619d558 commit 2490567
Show file tree
Hide file tree
Showing 6 changed files with 1,977 additions and 13 deletions.
1 change: 1 addition & 0 deletions conf/janus.plugin.audiobridge.jcfg.sample
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# audio_level_average = 25 (average value of audio level, 127=muted, 0='too loud', default=25)
# default_expectedloss = percent of packets we expect participants may miss, to help with FEC (default=0, max=20; automatically used for forwarders too)
# default_bitrate = default bitrate in bps to use for the all participants (default=0, which means libopus decides; automatically used for forwarders too)
# denoise = true|false (whether denoising via RNNoise should be performed for each participant by default)
# record = true|false (whether this room should be recorded, default=false)
# record_file = "/path/to/recording.wav" (where to save the recording)
# record_dir = "/path/to/" (path to save the recording to, makes record_file a relative path if provided)
Expand Down
10 changes: 10 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,16 @@ PKG_CHECK_MODULES([OGG],
AC_SUBST([OGG_CFLAGS])
AC_SUBST([OGG_LIBS])

PKG_CHECK_MODULES([RNNOISE],
[rnnoise],
[
AC_DEFINE(HAVE_RNNOISE)
],
[
])
AC_SUBST([RNNOISE_CFLAGS])
AC_SUBST([RNNOISE_LIBS])

PKG_CHECK_MODULES([LUA],
[lua],
[
Expand Down
11 changes: 6 additions & 5 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,14 @@ plugins_libadd = \

if ENABLE_PLUGIN_AUDIOBRIDGE
plugin_LTLIBRARIES += plugins/libjanus_audiobridge.la
plugins_libjanus_audiobridge_la_SOURCES = plugins/janus_audiobridge.c
plugins_libjanus_audiobridge_la_SOURCES = plugins/janus_audiobridge.c \
plugins/audiobridge-deps/jitter.c plugins/audiobridge-deps/arch.h \
plugins/audiobridge-deps/os_support.h plugins/audiobridge-deps/speex/speex_jitter.h \
plugins/audiobridge-deps/jitter.c plugins/audiobridge-deps/resample.c plugins/audiobridge-deps/arch.h \
plugins/audiobridge-deps/os_support.h plugins/audiobridge-deps/speex/speex_jitter.h plugins/audiobridge-deps/speex/speex_resampler.h \
plugins/audiobridge-deps/speex/speexdsp_types.h plugins/audiobridge-deps/speex/speexdsp_config_types.h
plugins_libjanus_audiobridge_la_CFLAGS = $(plugins_cflags) $(OPUS_CFLAGS) $(OGG_CFLAGS) $(LIBSRTP_CFLAGS)
plugins_libjanus_audiobridge_la_LDFLAGS = $(plugins_ldflags) $(OPUS_LDFLAGS) $(OPUS_LIBS) $(OGG_LDFLAGS) $(OGG_LIBS)
plugins_libjanus_audiobridge_la_LIBADD = $(plugins_libadd) $(OPUS_LIBADD) $(OGG_LIBADD)
plugins_libjanus_audiobridge_la_CFLAGS = $(plugins_cflags) $(OPUS_CFLAGS) $(OGG_CFLAGS) $(RNNOISE_CFLAGS) $(LIBSRTP_CFLAGS)
plugins_libjanus_audiobridge_la_LDFLAGS = $(plugins_ldflags) $(OPUS_LDFLAGS) $(OPUS_LIBS) $(OGG_LDFLAGS) $(OGG_LIBS) $(RNNOISE_LDFLAGS) $(RNNOISE_LIBS)
plugins_libjanus_audiobridge_la_LIBADD = $(plugins_libadd) $(OPUS_LIBADD) $(OGG_LIBADD) $(RNNOISE_LIBADD)
conf_DATA += ../conf/janus.plugin.audiobridge.jcfg.sample
EXTRA_DIST += ../conf/janus.plugin.audiobridge.jcfg.sample
endif
Expand Down
Loading

0 comments on commit 2490567

Please sign in to comment.