Commit 3cf15eb2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

OSS: use software amplification

parent e4e8a895
...@@ -20,9 +20,9 @@ libvlc_LTLIBRARIES += \ ...@@ -20,9 +20,9 @@ libvlc_LTLIBRARIES += \
libamem_plugin.la \ libamem_plugin.la \
libaout_file_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_CFLAGS = $(AM_CFLAGS)
liboss_plugin_la_LIBADD = $(AM_LIBADD) $(OSS_LIBS) liboss_plugin_la_LIBADD = $(AM_LIBADD) $(OSS_LIBS) $(LIBM)
liboss_plugin_la_DEPENDENCIES = liboss_plugin_la_DEPENDENCIES =
if HAVE_OSS if HAVE_OSS
libvlc_LTLIBRARIES += liboss_plugin.la libvlc_LTLIBRARIES += liboss_plugin.la
......
...@@ -75,6 +75,8 @@ struct aout_sys_t ...@@ -75,6 +75,8 @@ struct aout_sys_t
int i_fragstotal; int i_fragstotal;
mtime_t max_buffer_duration; mtime_t max_buffer_duration;
vlc_thread_t thread; vlc_thread_t thread;
float soft_gain;
bool soft_mute;
}; };
/* This must be a power of 2. */ /* This must be a power of 2. */
...@@ -91,6 +93,8 @@ static void* OSSThread ( void * ); ...@@ -91,6 +93,8 @@ static void* OSSThread ( void * );
static mtime_t BufferDuration( audio_output_t * p_aout ); static mtime_t BufferDuration( audio_output_t * p_aout );
#include "volume.h"
/***************************************************************************** /*****************************************************************************
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
...@@ -102,6 +106,7 @@ vlc_module_begin () ...@@ -102,6 +106,7 @@ vlc_module_begin ()
set_subcategory( SUBCAT_AUDIO_AOUT ) set_subcategory( SUBCAT_AUDIO_AOUT )
add_loadfile( "oss-audio-device", "/dev/dsp", add_loadfile( "oss-audio-device", "/dev/dsp",
N_("OSS DSP device"), NULL, false ) N_("OSS DSP device"), NULL, false )
add_sw_gain ()
set_capability( "audio output", 100 ) set_capability( "audio output", 100 )
add_shortcut( "oss" ) add_shortcut( "oss" )
...@@ -471,7 +476,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -471,7 +476,7 @@ static int Open( vlc_object_t *p_this )
aout_PacketInit( p_aout, &p_sys->packet, aout_PacketInit( p_aout, &p_sys->packet,
audio_buf.fragsize/p_aout->format.i_bytes_per_frame ); 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. */ /* Create OSS thread and wait for its readiness. */
......
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