Commit 0b087d21 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

JACK: use software amplification

parent 3cf15eb2
SOURCES_aout_file = file.c SOURCES_aout_file = file.c
SOURCES_waveout = waveout.c windows_audio_common.h packet.c SOURCES_waveout = waveout.c windows_audio_common.h packet.c
SOURCES_auhal = auhal.c packet.c SOURCES_auhal = auhal.c packet.c
SOURCES_jack = jack.c packet.c
SOURCES_audioqueue = audioqueue.c packet.c SOURCES_audioqueue = audioqueue.c packet.c
SOURCES_opensles_android = opensles_android.c SOURCES_opensles_android = opensles_android.c
...@@ -44,6 +43,13 @@ if HAVE_PULSE ...@@ -44,6 +43,13 @@ if HAVE_PULSE
libvlc_LTLIBRARIES += libpulse_plugin.la libvlc_LTLIBRARIES += libpulse_plugin.la
endif 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_SOURCES = directx.c windows_audio_common.h packet.c
libdirectsound_plugin_la_CFLAGS = $(AM_CFLAGS) libdirectsound_plugin_la_CFLAGS = $(AM_CFLAGS)
libdirectsound_plugin_la_LIBADD = $(AM_LIBADD) libdirectsound_plugin_la_LIBADD = $(AM_LIBADD)
......
...@@ -56,6 +56,8 @@ struct aout_sys_t ...@@ -56,6 +56,8 @@ struct aout_sys_t
jack_sample_t **p_jack_buffers; jack_sample_t **p_jack_buffers;
unsigned int i_channels; unsigned int i_channels;
jack_nframes_t latency; jack_nframes_t latency;
float soft_gain;
bool soft_mute;
}; };
/***************************************************************************** /*****************************************************************************
...@@ -66,6 +68,8 @@ static void Close ( vlc_object_t * ); ...@@ -66,6 +68,8 @@ static void Close ( vlc_object_t * );
static int Process ( jack_nframes_t i_frames, void *p_arg ); static int Process ( jack_nframes_t i_frames, void *p_arg );
static int GraphChange ( void *p_arg ); static int GraphChange ( void *p_arg );
#include "volume.h"
#define AUTO_CONNECT_OPTION "jack-auto-connect" #define AUTO_CONNECT_OPTION "jack-auto-connect"
#define AUTO_CONNECT_TEXT N_("Automatically connect to writable clients") #define AUTO_CONNECT_TEXT N_("Automatically connect to writable clients")
#define AUTO_CONNECT_LONGTEXT N_( \ #define AUTO_CONNECT_LONGTEXT N_( \
...@@ -91,6 +95,7 @@ vlc_module_begin () ...@@ -91,6 +95,7 @@ vlc_module_begin ()
AUTO_CONNECT_LONGTEXT, false ) AUTO_CONNECT_LONGTEXT, false )
add_string( CONNECT_REGEX_OPTION, "system", CONNECT_REGEX_TEXT, add_string( CONNECT_REGEX_OPTION, "system", CONNECT_REGEX_TEXT,
CONNECT_REGEX_LONGTEXT, false ) CONNECT_REGEX_LONGTEXT, false )
add_sw_gain( )
set_callbacks( Open, Close ) set_callbacks( Open, Close )
vlc_module_end () vlc_module_end ()
...@@ -143,7 +148,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -143,7 +148,7 @@ static int Open( vlc_object_t *p_this )
p_aout->pf_flush = aout_PacketFlush; p_aout->pf_flush = aout_PacketFlush;
aout_PacketInit( p_aout, &p_sys->packet, aout_PacketInit( p_aout, &p_sys->packet,
jack_get_buffer_size( p_sys->p_jack_client ) ); 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 ); p_sys->i_channels = aout_FormatNbChannels( &p_aout->format );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment