[vlc-commits] OSS: 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:42:29 2012 +0300| [3cf15eb2a1b30eb8be0ebe611958b0d39fea133d] | committer: Rémi Denis-Courmont
OSS: use software amplification
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3cf15eb2a1b30eb8be0ebe611958b0d39fea133d
---
modules/audio_output/Modules.am | 4 ++--
modules/audio_output/oss.c | 7 ++++++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/modules/audio_output/Modules.am b/modules/audio_output/Modules.am
index c732d9e..43c63f8 100644
--- a/modules/audio_output/Modules.am
+++ b/modules/audio_output/Modules.am
@@ -20,9 +20,9 @@ libvlc_LTLIBRARIES += \
libamem_plugin.la \
libaout_file_plugin.la
-liboss_plugin_la_SOURCES = oss.c packet.c
+liboss_plugin_la_SOURCES = oss.c packet.c volume.h
liboss_plugin_la_CFLAGS = $(AM_CFLAGS)
-liboss_plugin_la_LIBADD = $(AM_LIBADD) $(OSS_LIBS)
+liboss_plugin_la_LIBADD = $(AM_LIBADD) $(OSS_LIBS) $(LIBM)
liboss_plugin_la_DEPENDENCIES =
if HAVE_OSS
libvlc_LTLIBRARIES += liboss_plugin.la
diff --git a/modules/audio_output/oss.c b/modules/audio_output/oss.c
index 8222893..8633d72 100644
--- a/modules/audio_output/oss.c
+++ b/modules/audio_output/oss.c
@@ -75,6 +75,8 @@ struct aout_sys_t
int i_fragstotal;
mtime_t max_buffer_duration;
vlc_thread_t thread;
+ float soft_gain;
+ bool soft_mute;
};
/* This must be a power of 2. */
@@ -91,6 +93,8 @@ static void* OSSThread ( void * );
static mtime_t BufferDuration( audio_output_t * p_aout );
+#include "volume.h"
+
/*****************************************************************************
* Module descriptor
*****************************************************************************/
@@ -102,6 +106,7 @@ vlc_module_begin ()
set_subcategory( SUBCAT_AUDIO_AOUT )
add_loadfile( "oss-audio-device", "/dev/dsp",
N_("OSS DSP device"), NULL, false )
+ add_sw_gain ()
set_capability( "audio output", 100 )
add_shortcut( "oss" )
@@ -471,7 +476,7 @@ static int Open( vlc_object_t *p_this )
aout_PacketInit( p_aout, &p_sys->packet,
audio_buf.fragsize/p_aout->format.i_bytes_per_frame );
- aout_VolumeSoftInit( p_aout );
+ aout_SoftVolumeInit( p_aout );
}
/* Create OSS thread and wait for its readiness. */
More information about the vlc-commits
mailing list