From c6cd97d8991f46fbaaccd7a0fcda4b4afe9bf4a2 Mon Sep 17 00:00:00 2001 From: Guenter Bartsch Date: Thu, 24 Oct 2002 19:37:26 +0000 Subject: audio settings public interface CVS patchset: 2991 CVS date: 2002/10/24 19:37:26 --- ChangeLog | 2 ++ include/xine.h.in | 6 +++--- src/xine-engine/xine_interface.c | 28 +++++++++++++++++++++++----- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 635bd9c9a..20a108b33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -28,6 +28,8 @@ xine-lib (next version) [someone fill in stability and urgency] * numeric selection of dvd menu buttons (could make some dvd easter eggs accesible) * big api cleanup * xine engine can open more than one stream at a time + * audio compressor filter + * content detection fixes (e.g. mpeg program streams) xine-lib (0.9.13) unstable; urgency=low diff --git a/include/xine.h.in b/include/xine.h.in index 005cd3b53..2a1f0ce20 100644 --- a/include/xine.h.in +++ b/include/xine.h.in @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.h.in,v 1.24 2002/10/24 16:41:05 mroi Exp $ + * $Id: xine.h.in,v 1.25 2002/10/24 19:37:27 guenter Exp $ * * public xine-lib (libxine) interface and documentation * @@ -297,9 +297,9 @@ void xine_register_log_cb (xine_t *self, xine_log_cb_t cb, #define XINE_PARAM_AUDIO_CHANNEL_LOGICAL 3 /* -1 => auto, -2 => off */ #define XINE_PARAM_SPU_CHANNEL 4 #define XINE_PARAM_VIDEO_CHANNEL 5 -#define XINE_PARAM_AUDIO_VOLUME 6 /* 0..255 */ +#define XINE_PARAM_AUDIO_VOLUME 6 /* 0..100 */ #define XINE_PARAM_AUDIO_MUTE 7 /* 1=>mute, 0=>unmute */ -#define XINE_PARAM_AUDIO_COMPR_LEVEL 8 /* 0..255 */ +#define XINE_PARAM_AUDIO_COMPR_LEVEL 8 /* <100=>off, % compress otherw*/ #define XINE_PARAM_AUDIO_AMP_LEVEL 9 /* 0..200, 100=>100% (default) */ #define XINE_PARAM_AUDIO_REPORT_LEVEL 10 /* 1=>send events, 0=> don't */ diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c index 8b56b9f06..3f6017947 100644 --- a/src/xine-engine/xine_interface.c +++ b/src/xine-engine/xine_interface.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_interface.c,v 1.24 2002/10/20 16:18:07 guenter Exp $ + * $Id: xine_interface.c,v 1.25 2002/10/24 19:37:29 guenter Exp $ * * convenience/abstraction layer, functions to implement * libxine's public interface @@ -343,10 +343,19 @@ void xine_set_param (xine_stream_t *stream, int param, int value) { break; case XINE_PARAM_AUDIO_VOLUME: - break; /* FIXME: implement */ + if (stream->audio_out) + stream->audio_out->set_property (stream->audio_out, AO_PROP_MIXER_VOL, value); + break; case XINE_PARAM_AUDIO_MUTE: - break; /* FIXME: implement */ + if (stream->audio_out) + stream->audio_out->set_property (stream->audio_out, AO_PROP_MUTE_VOL, value); + break; + + case XINE_PARAM_AUDIO_COMPR_LEVEL: + if (stream->audio_out) + stream->audio_out->set_property (stream->audio_out, AO_PROP_COMPRESSOR, value); + break; case XINE_PARAM_VO_DEINTERLACE: case XINE_PARAM_VO_ASPECT_RATIO: @@ -385,10 +394,19 @@ int xine_get_param (xine_stream_t *stream, int param) { return stream->video_channel; case XINE_PARAM_AUDIO_VOLUME: - return -1; /* FIXME: implement */ + if (!stream->audio_out) + return -1; + return stream->audio_out->get_property (stream->audio_out, AO_PROP_MIXER_VOL); case XINE_PARAM_AUDIO_MUTE: - return -1; /* FIXME: implement */ + if (!stream->audio_out) + return -1; + return stream->audio_out->get_property (stream->audio_out, AO_PROP_MUTE_VOL); + + case XINE_PARAM_AUDIO_COMPR_LEVEL: + if (!stream->audio_out) + return -1; + return stream->audio_out->get_property (stream->audio_out, AO_PROP_COMPRESSOR); case XINE_PARAM_VO_DEINTERLACE: case XINE_PARAM_VO_ASPECT_RATIO: -- cgit v1.2.3