[vlc-commits] ALSA: use software amplification
Rémi Denis-Courmont
git at videolan.org
Thu Jul 19 19:42:00 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 19 17:41:18 2012 +0300| [e4e8a8958a9e0a9df022c854ad42a5d641080f48] | committer: Rémi Denis-Courmont
ALSA: use software amplification
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e4e8a8958a9e0a9df022c854ad42a5d641080f48
---
modules/audio_output/Modules.am | 4 ++--
modules/audio_output/alsa.c | 7 ++++++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/modules/audio_output/Modules.am b/modules/audio_output/Modules.am
index 1eca3c7..c732d9e 100644
--- a/modules/audio_output/Modules.am
+++ b/modules/audio_output/Modules.am
@@ -28,9 +28,9 @@ if HAVE_OSS
libvlc_LTLIBRARIES += liboss_plugin.la
endif
-libalsa_plugin_la_SOURCES = alsa.c
+libalsa_plugin_la_SOURCES = alsa.c volume.h
libalsa_plugin_la_CFLAGS = $(AM_CFLAGS) $(ALSA_CFLAGS)
-libalsa_plugin_la_LIBADD = $(AM_LIBADD) $(ALSA_LIBS)
+libalsa_plugin_la_LIBADD = $(AM_LIBADD) $(ALSA_LIBS) $(LIBM)
libalsa_plugin_la_DEPENDENCIES =
if HAVE_ALSA
libvlc_LTLIBRARIES += libalsa_plugin.la
diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c
index 7ca6abb..3c56cec 100644
--- a/modules/audio_output/alsa.c
+++ b/modules/audio_output/alsa.c
@@ -44,8 +44,12 @@ struct aout_sys_t
{
snd_pcm_t *pcm;
void (*reorder) (void *, size_t, unsigned);
+ float soft_gain;
+ bool soft_mute;
};
+#include "volume.h"
+
#define A52_FRAME_NB 1536
static int Open (vlc_object_t *);
@@ -88,6 +92,7 @@ vlc_module_begin ()
add_integer ("alsa-audio-channels", AOUT_CHANS_FRONT,
AUDIO_CHAN_TEXT, AUDIO_CHAN_LONGTEXT, false)
change_integer_list (channels, channels_text)
+ add_sw_gain ()
set_capability( "audio output", 150 )
set_callbacks( Open, Close )
vlc_module_end ()
@@ -528,7 +533,7 @@ static int Open (vlc_object_t *obj)
sys->reorder = NULL;
}
- aout_VolumeSoftInit (aout);
+ aout_SoftVolumeInit (aout);
}
aout->pf_play = Play;
More information about the vlc-commits
mailing list