* configure.in: Fixed a typo.
PLAYLIST := playlist
INPUT := input input_ext-plugins input_ext-dec input_ext-intf input_dec input_programs input_clock input_info
VIDEO_OUTPUT := video_output video_text vout_pictures vout_subpictures
-AUDIO_OUTPUT := audio_output filters input mixer output
+AUDIO_OUTPUT := audio_output filters input mixer output intf
STREAM_OUTPUT := stream_output
MISC := mtime modules threads cpu configuration netutils iso_lang messages objects extras
if test "x${with_qte}" = "x"
then
test_LDFLAGS="-L${QTDIR}/lib"
- test_CFLAGS="-I$(QTDIR)/include"
+ test_CFLAGS="-I${QTDIR}/include"
else
test_LDFLAGS="-L${with_qte}/lib"
test_CFLAGS="-I${with_qte}/include"
* aout_internal.h : internal defines for audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: aout_internal.h,v 1.17 2002/09/16 20:46:37 massiot Exp $
+ * $Id: aout_internal.h,v 1.18 2002/09/18 21:21:23 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
/*****************************************************************************
* Prototypes
*****************************************************************************/
+/* From input.c : */
void aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
aout_buffer_t * p_buffer );
+/* From filters.c : */
int aout_FiltersCreatePipeline( aout_instance_t * p_aout,
aout_filter_t ** pp_filters,
int * pi_nb_filters,
aout_filter_t ** pp_filters,
int i_nb_filters, aout_buffer_t ** pp_input_buffer );
+/* From mixer.c : */
int aout_MixerNew( aout_instance_t * p_aout );
void aout_MixerDelete( aout_instance_t * p_aout );
void aout_MixerRun( aout_instance_t * p_aout );
int aout_MixerMultiplierSet( aout_instance_t * p_aout, float f_multiplier );
int aout_MixerMultiplierGet( aout_instance_t * p_aout, float * pf_multiplier );
+/* From output.c : */
int aout_OutputNew( aout_instance_t * p_aout,
audio_sample_format_t * p_format );
void aout_OutputPlay( aout_instance_t * p_aout, aout_buffer_t * p_buffer );
void aout_OutputDelete( aout_instance_t * p_aout );
VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t, vlc_bool_t ) );
+/* From audio_output.c : */
VLC_EXPORT( int, aout_FormatNbChannels, ( audio_sample_format_t * p_format ) );
void aout_FormatPrepare( audio_sample_format_t * p_format );
void aout_FifoInit( aout_instance_t *, aout_fifo_t *, u32 );
VLC_EXPORT( aout_buffer_t *, aout_FifoPop, ( aout_instance_t * p_aout, aout_fifo_t * p_fifo ) );
void aout_FifoDestroy( aout_instance_t * p_aout, aout_fifo_t * p_fifo );
+/* From intf.c :*/
+VLC_EXPORT( void, aout_VolumeSoftInit, ( aout_instance_t * ) );
+int aout_VolumeSoftGet( aout_instance_t *, audio_volume_t * );
+int aout_VolumeSoftSet( aout_instance_t *, audio_volume_t );
+int aout_VolumeSoftInfos( aout_instance_t *, audio_volume_t *, audio_volume_t * );
+VLC_EXPORT( void, aout_VolumeNoneInit, ( aout_instance_t * ) );
+int aout_VolumeNoneGet( aout_instance_t *, audio_volume_t * );
+int aout_VolumeNoneSet( aout_instance_t *, audio_volume_t );
+int aout_VolumeNoneInfos( aout_instance_t *, audio_volume_t *, audio_volume_t * );
+
* audio_output.h : audio output interface
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: audio_output.h,v 1.63 2002/09/16 20:46:37 massiot Exp $
+ * $Id: audio_output.h,v 1.64 2002/09/18 21:21:23 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
u32 i_remainder;
};
-/*****************************************************************************
- * audio_volume_t : integer value for the audio volume
- *****************************************************************************/
-typedef unsigned int audio_volume_t;
-
/*****************************************************************************
* Prototypes
*****************************************************************************/
VLC_EXPORT( void, aout_InputDelete, ( aout_instance_t *, aout_input_t * ) );
/* From intf.c : */
+VLC_EXPORT( int, aout_VolumeGet, ( aout_instance_t *, audio_volume_t * ) );
+VLC_EXPORT( int, aout_VolumeSet, ( aout_instance_t *, audio_volume_t ) );
+VLC_EXPORT( int, aout_VolumeInfos, ( aout_instance_t *, audio_volume_t *, audio_volume_t * ) );
+VLC_EXPORT( int, aout_VolumeUp, ( aout_instance_t *, int, audio_volume_t * ) );
+VLC_EXPORT( int, aout_VolumeDown, ( aout_instance_t *, int, audio_volume_t * ) );
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.26 2002/08/30 22:22:24 massiot Exp $
+ * $Id: vlc_common.h,v 1.27 2002/09/18 21:21:23 massiot Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
/* Video buffer types */
typedef u8 yuv_data_t;
+/* Audio volume */
+typedef u16 audio_volume_t;
+
/*****************************************************************************
* mtime_t: high precision date or time interval
*****************************************************************************
int (* __vlc_threads_end_inner) ( vlc_object_t * ) ;
int (* __vlc_threads_init_inner) ( vlc_object_t * ) ;
int (* aout_FormatNbChannels_inner) ( audio_sample_format_t * p_format ) ;
+ int (* aout_VolumeDown_inner) ( aout_instance_t *, int, audio_volume_t * ) ;
+ int (* aout_VolumeGet_inner) ( aout_instance_t *, audio_volume_t * ) ;
+ int (* aout_VolumeInfos_inner) ( aout_instance_t *, audio_volume_t *, audio_volume_t * ) ;
+ int (* aout_VolumeSet_inner) ( aout_instance_t *, audio_volume_t ) ;
+ int (* aout_VolumeUp_inner) ( aout_instance_t *, int, audio_volume_t * ) ;
int (* input_AccessInit_inner) ( input_thread_t * ) ;
int (* input_AddInfo_inner) ( input_info_category_t *, char *, char *, ... ) ;
int (* input_ChangeArea_inner) ( input_thread_t *, input_area_t * ) ;
void (* aout_DateSet_inner) ( audio_date_t *, mtime_t ) ;
void (* aout_DeleteInstance_inner) ( aout_instance_t * ) ;
void (* aout_InputDelete_inner) ( aout_instance_t *, aout_input_t * ) ;
+ void (* aout_VolumeNoneInit_inner) ( aout_instance_t * ) ;
+ void (* aout_VolumeSoftInit_inner) ( aout_instance_t * ) ;
void (* config_Duplicate_inner) ( module_t *, module_config_t * ) ;
void (* config_SetCallbacks_inner) ( module_config_t *, module_config_t * ) ;
void (* config_UnsetCallbacks_inner) ( module_config_t * ) ;
# define aout_FormatNbChannels p_symbols->aout_FormatNbChannels_inner
# define aout_InputDelete p_symbols->aout_InputDelete_inner
# define aout_OutputNextBuffer p_symbols->aout_OutputNextBuffer_inner
+# define aout_VolumeDown p_symbols->aout_VolumeDown_inner
+# define aout_VolumeGet p_symbols->aout_VolumeGet_inner
+# define aout_VolumeInfos p_symbols->aout_VolumeInfos_inner
+# define aout_VolumeNoneInit p_symbols->aout_VolumeNoneInit_inner
+# define aout_VolumeSet p_symbols->aout_VolumeSet_inner
+# define aout_VolumeSoftInit p_symbols->aout_VolumeSoftInit_inner
+# define aout_VolumeUp p_symbols->aout_VolumeUp_inner
# define config_Duplicate p_symbols->config_Duplicate_inner
# define config_FindConfig p_symbols->config_FindConfig_inner
# define config_GetHomeDir p_symbols->config_GetHomeDir_inner
* alsa.c : alsa plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: alsa.c,v 1.10 2002/08/30 23:27:06 massiot Exp $
+ * $Id: alsa.c,v 1.11 2002/09/18 21:21:23 massiot Exp $
*
* Authors: Henri Fallon <henri@videolan.org> - Original Author
* Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
"iec958:AES0=0x%x,AES1=0x%x,AES2=0x%x,AES3=0x%x",
s[0], s[1], s[2], s[3] );
psz_device = psz_alsadev;
+
+ aout_VolumeNoneInit( p_aout );
}
else
{
psz_device = "default";
+
+ aout_VolumeSoftInit( p_aout );
}
}
* arts.c : aRts module
*****************************************************************************
* Copyright (C) 2001-2002 VideoLAN
- * $Id: arts.c,v 1.10 2002/08/30 23:27:06 massiot Exp $
+ * $Id: arts.c,v 1.11 2002/09/18 21:21:23 massiot Exp $
*
* Authors: Emmanuel Blindauer <manu@agat.net>
* Samuel Hocevar <sam@zoy.org>
}
p_aout->output.pf_play = Play;
+ aout_VolumeSoftInit( p_aout );
p_sys->stream = NULL;
* esd.c : EsounD module
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: esd.c,v 1.12 2002/08/30 23:27:06 massiot Exp $
+ * $Id: esd.c,v 1.13 2002/09/18 21:21:23 massiot Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
p_aout->output.p_sys = p_sys;
p_aout->output.pf_play = Play;
+ aout_VolumeSoftInit( p_aout );
/* Initialize some variables */
p_sys->esd_format = ESD_BITS16 | ESD_STREAM | ESD_PLAY;
* file.c : audio output which writes the samples to a file
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: file.c,v 1.10 2002/08/30 23:27:06 massiot Exp $
+ * $Id: file.c,v 1.11 2002/09/18 21:21:23 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
if ( p_file == NULL ) return -1;
p_aout->output.pf_play = Play;
+ aout_VolumeSoftInit( p_aout );
while ( *ppsz_compare != NULL )
{
* oss.c : OSS /dev/dsp module for vlc
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
- * $Id: oss.c,v 1.25 2002/09/14 20:51:11 stef Exp $
+ * $Id: oss.c,v 1.26 2002/09/18 21:21:23 massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
p_aout->output.i_nb_samples = A52_FRAME_NB;
p_aout->output.output.i_bytes_per_frame = AOUT_SPDIF_SIZE;
p_aout->output.output.i_frame_length = A52_FRAME_NB;
+
+ aout_VolumeNoneInit( p_aout );
}
else
{
p_aout->output.output.i_format = i_format = AOUT_FMT_S16_NE;
p_aout->output.i_nb_samples = FRAME_SIZE;
+
+ aout_VolumeSoftInit( p_aout );
}
if( ioctl( p_sys->i_fd, SNDCTL_DSP_SETFMT, &i_format ) < 0
* sdl.c : SDL audio output plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
- * $Id: sdl.c,v 1.11 2002/09/02 23:17:05 massiot Exp $
+ * $Id: sdl.c,v 1.12 2002/09/18 21:21:23 massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
p_aout->output.pf_play = Play;
+ aout_VolumeSoftInit( p_aout );
#ifndef WIN32
/* Win32 SDL implementation doesn't support SDL_INIT_EVENTTHREAD yet*/
i_flags |= SDL_INIT_EVENTTHREAD;
* waveout.c : Windows waveOut plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: waveout.c,v 1.6 2002/08/30 23:27:06 massiot Exp $
+ * $Id: waveout.c,v 1.7 2002/09/18 21:21:23 massiot Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
}
p_aout->output.pf_play = Play;
+ aout_VolumeSoftInit( p_aout );
/* calculate the frame size in bytes */
p_aout->output.p_sys->i_buffer_size = FRAME_SIZE * sizeof(s16)
* aout.cpp: BeOS audio output
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: AudioOutput.cpp,v 1.7 2002/08/30 23:27:06 massiot Exp $
+ * $Id: AudioOutput.cpp,v 1.8 2002/09/18 21:21:23 massiot Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
}
p_aout->output.pf_play = Play;
+ aout_VolumeSoftInit( p_aout );
return 0;
}
* aout.m: CoreAudio output plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: aout.m,v 1.9 2002/09/02 23:17:05 massiot Exp $
+ * $Id: aout.m,v 1.10 2002/09/18 21:21:24 massiot Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
}
p_aout->output.pf_play = Play;
+ aout_VolumeSoftInit( p_aout );
/* Get a description of the data format used by the device */
i_param_size = sizeof( p_sys->stream_format );
p_aout->output.p_sys->p_silent_buffer = malloc( DEFAULT_FRAME_SIZE * 4 );
p_aout->output.pf_play = Play;
+ aout_VolumeSoftInit( p_aout );
memset( &pi, 0, sizeof(pi) );
memset( &pp, 0, sizeof(pp) );
* aout_dummy.c : dummy audio output plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: aout.c,v 1.8 2002/08/30 23:27:06 massiot Exp $
+ * $Id: aout.c,v 1.9 2002/09/18 21:21:24 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
aout_instance_t * p_aout = (aout_instance_t *)p_this;
p_aout->output.pf_play = Play;
+ aout_VolumeSoftInit( p_aout );
if ( p_aout->output.output.i_format == AOUT_FMT_SPDIF )
{
* aout.c: Windows DirectX audio output method
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: aout.c,v 1.9 2002/08/30 23:27:06 massiot Exp $
+ * $Id: aout.c,v 1.10 2002/09/18 21:21:24 massiot Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
vlc_mutex_init( p_aout, &p_aout->output.p_sys->buffer_lock );
p_aout->output.pf_play = Play;
+ aout_VolumeSoftInit( p_aout );
/* Initialise DirectSound */
if( DirectxInitDSound( p_aout ) )
* intf.c : audio output API towards the interface modules
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: intf.c,v 1.1 2002/09/16 20:46:38 massiot Exp $
+ * $Id: intf.c,v 1.2 2002/09/18 21:21:24 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
/* Meant to be called by the output plug-in's Open(). */
void aout_VolumeSoftInit( aout_instance_t * p_aout )
{
- p_aout->output.i_volume = AOUT_VOLUME_DEFAULT;
+ int i_volume;
+
+ i_volume = config_GetInt( p_aout, "volume" );
+ if ( i_volume == -1 )
+ {
+ p_aout->output.i_volume = AOUT_VOLUME_DEFAULT;
+ }
+ else
+ {
+ p_aout->output.i_volume = i_volume;
+ }
+
+ p_aout->output.pf_volume_infos = aout_VolumeSoftInfos;
+ p_aout->output.pf_volume_get = aout_VolumeSoftGet;
+ p_aout->output.pf_volume_set = aout_VolumeSoftSet;
}
/* Placeholder for pf_volume_infos(). */
return 0;
}
+/*
+ * The next functions are not supposed to be called by the interface, but
+ * are placeholders for unsupported scaling.
+ */
+
+/* Meant to be called by the output plug-in's Open(). */
+void aout_VolumeNoneInit( aout_instance_t * p_aout )
+{
+ p_aout->output.pf_volume_infos = aout_VolumeNoneInfos;
+ p_aout->output.pf_volume_get = aout_VolumeNoneGet;
+ p_aout->output.pf_volume_set = aout_VolumeNoneSet;
+}
+
+/* Placeholder for pf_volume_infos(). */
+int aout_VolumeNoneInfos( aout_instance_t * p_aout,
+ audio_volume_t * pi_low_soft,
+ audio_volume_t * pi_high_soft )
+{
+ return -1;
+}
+
+/* Placeholder for pf_volume_get(). */
+int aout_VolumeNoneGet( aout_instance_t * p_aout, audio_volume_t * pi_volume )
+{
+ return -1;
+}
+
+
+/* Placeholder for pf_volume_set(). */
+int aout_VolumeNoneSet( aout_instance_t * p_aout, audio_volume_t i_volume )
+{
+ return -1;
+}
+
(p_symbols)->aout_OutputNextBuffer_inner = aout_OutputNextBuffer; \
(p_symbols)->aout_FormatNbChannels_inner = aout_FormatNbChannels; \
(p_symbols)->aout_FifoPop_inner = aout_FifoPop; \
+ (p_symbols)->aout_VolumeSoftInit_inner = aout_VolumeSoftInit; \
+ (p_symbols)->aout_VolumeNoneInit_inner = aout_VolumeNoneInit; \
(p_symbols)->__aout_NewInstance_inner = __aout_NewInstance; \
(p_symbols)->aout_DeleteInstance_inner = aout_DeleteInstance; \
(p_symbols)->aout_BufferNew_inner = aout_BufferNew; \
(p_symbols)->aout_DateIncrement_inner = aout_DateIncrement; \
(p_symbols)->__aout_InputNew_inner = __aout_InputNew; \
(p_symbols)->aout_InputDelete_inner = aout_InputDelete; \
+ (p_symbols)->aout_VolumeGet_inner = aout_VolumeGet; \
+ (p_symbols)->aout_VolumeSet_inner = aout_VolumeSet; \
+ (p_symbols)->aout_VolumeInfos_inner = aout_VolumeInfos; \
+ (p_symbols)->aout_VolumeUp_inner = aout_VolumeUp; \
+ (p_symbols)->aout_VolumeDown_inner = aout_VolumeDown; \
(p_symbols)->__config_GetInt_inner = __config_GetInt; \
(p_symbols)->__config_PutInt_inner = __config_PutInt; \
(p_symbols)->__config_GetFloat_inner = __config_GetFloat; \