]> git.sesse.net Git - vlc/commitdiff
* ALL: More hooks for audio volume management.
authorChristophe Massiot <massiot@videolan.org>
Wed, 18 Sep 2002 21:21:24 +0000 (21:21 +0000)
committerChristophe Massiot <massiot@videolan.org>
Wed, 18 Sep 2002 21:21:24 +0000 (21:21 +0000)
* configure.in: Fixed a typo.

20 files changed:
Makefile.old
configure.in
include/aout_internal.h
include/audio_output.h
include/vlc_common.h
include/vlc_symbols.h
modules/audio_output/alsa.c
modules/audio_output/arts.c
modules/audio_output/esd.c
modules/audio_output/file.c
modules/audio_output/oss.c
modules/audio_output/sdl.c
modules/audio_output/waveout.c
modules/gui/beos/AudioOutput.cpp
modules/gui/macosx/aout.m
modules/gui/qnx/aout.c
modules/misc/dummy/aout.c
modules/video_output/directx/aout.c
src/audio_output/intf.c
src/misc/modules_plugin.h

index 52b68422dd93b851752c08f93e93e1739e3adf29..33ce20ea64303d8323c3b5d537d5581ad87fa111 100644 (file)
@@ -22,7 +22,7 @@ INTERFACE := interface intf_eject
 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
 
index bbabddedabb6c378192173ddff9a99be61c820be..abb494f8b5daab91b6795d084544327bd453ccec 100644 (file)
@@ -1392,7 +1392,7 @@ then
   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"
index 9c0532c27a3b3127ae7e7532c849cd89d396f596..fb2a7f18780aaecc7a0f3abfaf353c85a70cd57d 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
  *
@@ -210,9 +210,11 @@ struct aout_instance_t
 /*****************************************************************************
  * 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,
@@ -228,18 +230,21 @@ void aout_FiltersPlay( aout_instance_t * p_aout,
                        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 );
@@ -250,3 +255,13 @@ void aout_FifoMoveDates( aout_instance_t *, aout_fifo_t *, mtime_t );
 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 * );
+
index 2439b950f9e03d3fd9b0f534b674310ba74b80d7..bb1df6a2f9da8a93d548c375b5317286f24a4fbe 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
  *
@@ -165,11 +165,6 @@ struct audio_date_t
     u32     i_remainder;
 };
 
-/*****************************************************************************
- * audio_volume_t : integer value for the audio volume
- *****************************************************************************/
-typedef unsigned int audio_volume_t;
-
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
@@ -192,4 +187,9 @@ VLC_EXPORT( aout_input_t *, __aout_InputNew, ( vlc_object_t *, aout_instance_t *
 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 * ) );
 
index 3432149a5ebcc3677242ea0133428a2f48c08ae8..4c15aeea06c845d895bb22b03460c1c03c87f941 100644 (file)
@@ -3,7 +3,7 @@
  * 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>
@@ -114,6 +114,9 @@ typedef s16                 dctelem_t;
 /* Video buffer types */
 typedef u8                  yuv_data_t;
 
+/* Audio volume */
+typedef u16                 audio_volume_t;
+
 /*****************************************************************************
  * mtime_t: high precision date or time interval
  *****************************************************************************
index 3ca601625272a07fd4dcd11b91cd0bb98b3532a7..505147b5eff0eb0734d19f3fe27241462072ee67 100644 (file)
@@ -38,6 +38,11 @@ struct module_symbols_t
     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 * ) ;
@@ -112,6 +117,8 @@ struct module_symbols_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 * ) ;
@@ -228,6 +235,13 @@ struct module_symbols_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
index 459210e192d70251fceb3934f222baa8ad22f074..b735c88e63db36eafa2990fadb833deafea55456 100644 (file)
@@ -2,7 +2,7 @@
  * 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
@@ -150,10 +150,14 @@ static int Open( vlc_object_t *p_this )
                      "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 );
         }
     }
 
index cfcead5b3e5b78517aa0d431f3b0e5f16fa4a8b4..d8a29f858a2c02716d94820619317a849248633a 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
@@ -97,6 +97,7 @@ static int Open( vlc_object_t *p_this )
     }
 
     p_aout->output.pf_play = Play;
+    aout_VolumeSoftInit( p_aout );
 
     p_sys->stream = NULL;
 
index cc66a7ec41e519b3f2136bbbe9355015e16df9a9..496f1c9f6b5209f774ff27fa34811b2f04cf9c0d 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
  *
@@ -87,6 +87,7 @@ static int Open( vlc_object_t *p_this )
     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;
index 36d2dcc272d0e454034dd751f09d2ff61700594a..2bc7610bff3aa3077080e2a519def01993107646 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
  *
@@ -92,6 +92,7 @@ static int Open( vlc_object_t * p_this )
     if ( p_file == NULL ) return -1;
 
     p_aout->output.pf_play = Play;
+    aout_VolumeSoftInit( p_aout );
 
     while ( *ppsz_compare != NULL )
     {
index b57238bd1f7fb62daf17a9b60b0dcde19df017f6..c3c3582a32e4ad836b1d2b99dd9917bd659c503f 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
@@ -164,11 +164,15 @@ static int Open( vlc_object_t *p_this )
         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
index ef671a5c0b717bcfd36d7b3a55ecc3da6d6b39bc..7712c6be07171a7964b6f5dd36c0b6442c7d04b4 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
@@ -86,6 +86,7 @@ static int Open ( vlc_object_t *p_this )
 
     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;
index 8ca19f26172d712f080669f65f1f063c5012b4d7..b419cff47eed2b776a4b131dd040118f3902289f 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
  *      
@@ -101,6 +101,7 @@ static int Open( vlc_object_t *p_this )
     }
 
     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)
index 378c311327e92d059ddc6ca0e5aa759c3fd0edbc..93d6f317dd348414c41bd076f53470cd1e90605d 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
@@ -110,6 +110,7 @@ int E_(OpenAudio) ( vlc_object_t * p_this )
     }
     
     p_aout->output.pf_play = Play;
+    aout_VolumeSoftInit( p_aout );
 
     return 0;
 }
index 6436ed5eb23e3e74d0da741ecd500fec22bc8b2e..0ebd41d5123d1ff20ec40f8b68fb6c644241fafa 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
@@ -99,6 +99,7 @@ int E_(OpenAudio)( vlc_object_t * p_this )
     }
 
     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 ); 
index 02b36de53d099a5469e74f849279fc355c48f7e6..17a9d045ca4617f23336ce2d30468504c816c8e5 100644 (file)
@@ -106,6 +106,7 @@ int E_(OpenAudio)( vlc_object_t *p_this )
 
     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) );
index b7fb30fe1b3fa0b75e9f5358514612a2c87a6b8e..87b1025e941601f09658c1af2795066308494b82 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
  *
@@ -48,6 +48,7 @@ int E_(OpenAudio) ( vlc_object_t * p_this )
     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 )
     {
index 532a6baa660d81c84d119061ecdb01d548992610..ed201dacc5fadd658c44107396e22c528aa34552 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
  *
@@ -129,6 +129,7 @@ int E_(OpenAudio) ( vlc_object_t *p_this )
     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 ) )
index 41c7226a967b3bab7aef6294b6a812875a79cffe..260b2a04b9dd735d9301840ed7170019fd09fdae 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
  *
@@ -217,7 +217,21 @@ int aout_VolumeDown( aout_instance_t * p_aout, int i_nb_steps,
 /* 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(). */
@@ -246,3 +260,37 @@ int aout_VolumeSoftSet( aout_instance_t * p_aout,
     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;
+}
+
index fb346e824fe282016fa8482cf2f786e0ca981e29..087a4cba9bccb19ea0ed81495728c9a0b56ba547 100644 (file)
@@ -182,6 +182,8 @@ static const char * module_error( char *psz_buffer )
     (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; \
@@ -194,6 +196,11 @@ static const char * module_error( char *psz_buffer )
     (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; \