[vlc-commits] JACK: use software amplification

Rémi Denis-Courmont git at videolan.org
Thu Jul 19 19:42:01 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 19 17:58:14 2012 +0300| [0b087d2113eedf04f1d72a6052e316dc0d7526bf] | committer: Rémi Denis-Courmont

JACK: use software amplification

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0b087d2113eedf04f1d72a6052e316dc0d7526bf
---

 modules/audio_output/Modules.am |    8 +++++++-
 modules/audio_output/jack.c     |    7 ++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/modules/audio_output/Modules.am b/modules/audio_output/Modules.am
index 43c63f8..92e9ce0 100644
--- a/modules/audio_output/Modules.am
+++ b/modules/audio_output/Modules.am
@@ -1,7 +1,6 @@
 SOURCES_aout_file = file.c
 SOURCES_waveout = waveout.c windows_audio_common.h packet.c
 SOURCES_auhal = auhal.c packet.c
-SOURCES_jack = jack.c packet.c
 SOURCES_audioqueue = audioqueue.c packet.c
 SOURCES_opensles_android = opensles_android.c
 
@@ -44,6 +43,13 @@ if HAVE_PULSE
 libvlc_LTLIBRARIES += libpulse_plugin.la
 endif
 
+libjack_plugin_la_SOURCES = oss.c packet.c volume.h
+libjack_plugin_la_CFLAGS = $(AM_CFLAGS) $(JACK_CFLAGS)
+libjack_plugin_la_LIBADD = $(AM_LIBADD) $(JACK_LIBS) $(LIBM)
+libjack_plugin_la_DEPENDENCIES =
+EXTRA_LTLIBRARIES += libjack_plugin.la
+libvlc_LTLIBRARIES += $(LTLIBjack)
+
 libdirectsound_plugin_la_SOURCES = directx.c windows_audio_common.h packet.c
 libdirectsound_plugin_la_CFLAGS = $(AM_CFLAGS)
 libdirectsound_plugin_la_LIBADD = $(AM_LIBADD)
diff --git a/modules/audio_output/jack.c b/modules/audio_output/jack.c
index a2b243f..3cec48c 100644
--- a/modules/audio_output/jack.c
+++ b/modules/audio_output/jack.c
@@ -56,6 +56,8 @@ struct aout_sys_t
     jack_sample_t **p_jack_buffers;
     unsigned int    i_channels;
     jack_nframes_t latency;
+    float soft_gain;
+    bool soft_mute;
 };
 
 /*****************************************************************************
@@ -66,6 +68,8 @@ static void Close        ( vlc_object_t * );
 static int  Process      ( jack_nframes_t i_frames, void *p_arg );
 static int  GraphChange  ( void *p_arg );
 
+#include "volume.h"
+
 #define AUTO_CONNECT_OPTION "jack-auto-connect"
 #define AUTO_CONNECT_TEXT N_("Automatically connect to writable clients")
 #define AUTO_CONNECT_LONGTEXT N_( \
@@ -91,6 +95,7 @@ vlc_module_begin ()
               AUTO_CONNECT_LONGTEXT, false )
     add_string( CONNECT_REGEX_OPTION, "system", CONNECT_REGEX_TEXT,
                 CONNECT_REGEX_LONGTEXT, false )
+    add_sw_gain( )
     set_callbacks( Open, Close )
 vlc_module_end ()
 
@@ -143,7 +148,7 @@ static int Open( vlc_object_t *p_this )
     p_aout->pf_flush = aout_PacketFlush;
     aout_PacketInit( p_aout, &p_sys->packet,
                      jack_get_buffer_size( p_sys->p_jack_client ) );
-    aout_VolumeSoftInit( p_aout );
+    aout_SoftVolumeInit( p_aout );
 
     p_sys->i_channels = aout_FormatNbChannels( &p_aout->format );
 



More information about the vlc-commits mailing list