diff --git a/configure.ac b/configure.ac index f89f48e8..dc340301 100644 --- a/configure.ac +++ b/configure.ac @@ -150,6 +150,11 @@ AC_ARG_ENABLE(rfxcodec, AS_HELP_STRING([--disable-rfxcodec], [], [enable_rfxcodec=yes]) AM_CONDITIONAL(XRDP_RFXCODEC, [test x$enable_rfxcodec = xyes]) +AC_ARG_ENABLE(rdpsndaudin, AS_HELP_STRING([--enable-rdpsndaudin], + [Use rdpsnd audio in (default: no)]), + [], [enable_rdpsndaudin=no]) +AM_CONDITIONAL(XRDP_RDPSNDAUDIN, [test x$enable_rdpsndaudin = xyes]) + # Don't fail without working nasm if rfxcodec is not enabled if test "x$enable_rfxcodec" != xyes; then with_simd=no @@ -390,6 +395,7 @@ echo " vsock $enable_vsock" echo " pam $enable_pam" echo " kerberos $enable_kerberos" echo " debug $enable_xrdpdebug" +echo " rdpsndaudin $enable_rdpsndaudin" echo "" echo " strict_locations $enable_strict_locations" echo " prefix $prefix" diff --git a/sesman/chansrv/Makefile.am b/sesman/chansrv/Makefile.am index 293efeca..1b7df07e 100644 --- a/sesman/chansrv/Makefile.am +++ b/sesman/chansrv/Makefile.am @@ -37,6 +37,10 @@ AM_CPPFLAGS += -DXRDP_MP3LAME CHANSRV_EXTRA_LIBS += -lmp3lame endif +if XRDP_RDPSNDAUDIN +AM_CPPFLAGS += -DXRDP_RDPSNDAUDIN +endif + AM_CFLAGS = $(X_CFLAGS) sbin_PROGRAMS = \ diff --git a/sesman/chansrv/sound.c b/sesman/chansrv/sound.c index 87e65c50..b0480d33 100644 --- a/sesman/chansrv/sound.c +++ b/sesman/chansrv/sound.c @@ -1438,6 +1438,7 @@ sound_check_wait_objs(void) static int sound_send_server_input_formats(void) { +#if defined(XRDP_RDPSNDAUDIN) struct stream *s; int bytes; int index; @@ -1492,6 +1493,10 @@ sound_send_server_input_formats(void) bytes = (int)(s->end - s->data); send_channel_data(g_rdpsnd_chan_id, s->data, bytes); free_stream(s); +#else + /* avoid warning */ + (void)g_wave_inp_formats; +#endif return 0; }