]> git.sesse.net Git - vlc/commitdiff
Move #define from audio_output.h to config.h
authorRenaud Dartus <reno@videolan.org>
Tue, 19 Dec 2000 22:34:34 +0000 (22:34 +0000)
committerRenaud Dartus <reno@videolan.org>
Tue, 19 Dec 2000 22:34:34 +0000 (22:34 +0000)
Change vlan_server_ip to vishnou's ip (but vlans not working yet)

include/audio_output.h
include/config.h.in
plugins/beos/aout_beos.cpp
plugins/dsp/aout_dsp.c
plugins/dummy/aout_dummy.c
plugins/esd/aout_esd.c
src/audio_output/audio_output.c
src/interface/interface.c
src/interface/intf_ctrl.c

index 6f4cfd2ddc5750eb37bccb788fda3ca64c4df1e7..acde929a4824fb574126ab82b1376a0598e3616b 100644 (file)
  * - Créer un flag destroy dans les fifos audio pour indiquer au thread audio
  *   qu'il peut libérer la mémoire occupée par le buffer de la fifo lorsqu'il
  *   le désire (fin du son ou fin du thread)
- * - Redéplacer les #define dans config.h
  *
  */
 
-/*
- * Defines => "config.h"
- */
-
-/* Default output device. You probably should not change this. */
-#define AOUT_DEFAULT_DEVICE     "/dev/dsp"
-
-/* Default audio output format (AOUT_FMT_S16_NE = Native Endianess) */
-#define AOUT_DEFAULT_FORMAT     AOUT_FMT_S16_NE
-
-/* #define AOUT_DEFAULT_FORMAT     AOUT_FMT_S8 */
-/* #define AOUT_DEFAULT_FORMAT     AOUT_FMT_U8 */
-/* #define AOUT_DEFAULT_FORMAT     AOUT_FMT_S16_BE */
-/* #define AOUT_DEFAULT_FORMAT     AOUT_FMT_S16_LE */
-/* #define AOUT_DEFAULT_FORMAT     AOUT_FMT_U16_BE */
-/* #define AOUT_DEFAULT_FORMAT     AOUT_FMT_U16_LE */
-
-
-/* Default stereo mode (0 stands for mono, 1 for stereo) */
-#define AOUT_DEFAULT_STEREO     1
-/* #define AOUT_DEFAULT_STEREO     0 */
-
-/* Audio output rate, in Hz */
-#define AOUT_MIN_RATE           22050 /* XXX?? */
-#define AOUT_DEFAULT_RATE       44100
-#define AOUT_MAX_RATE           48000
-
-
-/* Volume (default 256) */
-#define VOL     256
-#define VOLSTEP 5
-#define VOLMAX  765
-
-/* Number of audio output frames contained in an audio output fifo.
- * (AOUT_FIFO_SIZE + 1) must be a power of 2, in order to optimise the
- * %(AOUT_FIFO_SIZE + 1) operation with an &AOUT_FIFO_SIZE.
- * With 511 we have at least 511*384/2/48000=2 seconds of sound */
-#define AOUT_FIFO_SIZE          511
-
-/* Maximum number of audio fifos. The value of AOUT_MAX_FIFOS should be a power
- * of two, in order to optimize the '/AOUT_MAX_FIFOS' and '*AOUT_MAX_FIFOS'
- * operations with '>>' and '<<' (gcc changes this at compilation-time) */
-#define AOUT_MAX_FIFOS          2
-
-/* Duration (in microseconds) of an audio output buffer should be :
- * - short, in order to be able to play a new song very quickly (especially a
- *   song from the interface)
- * - long, in order to perform the buffer calculations as few as possible */
-#define AOUT_BUFFER_DURATION    100000
-
 /*
  * Macros
  */
index 17d42cd0a282fabe5ad0e7e5373dab40e13ab39a..5ea4e4dfef5083d51e25114355f83ace4dd28acc 100644 (file)
 
 /* Default server and port */
 #define INPUT_VLAN_SERVER_VAR           "vlc_vlan_server"
-#define INPUT_VLAN_SERVER_DEFAULT       "138.195.140.31"
+#define INPUT_VLAN_SERVER_DEFAULT       "138.195.139.95"
 #define INPUT_VLAN_PORT_VAR             "vlc_vlan_port"
 #define INPUT_VLAN_PORT_DEFAULT         6010
 
 #define AOUT_METHOD_VAR                 "vlc_aout"
 
 /* The fallback method */
-#define AOUT_DEFAULT_METHOD "dsp"
+#define AOUT_DEFAULT_METHOD             "dsp"
 
 /* Environment variable used to store dsp device name, and default value */
 #define AOUT_DSP_VAR                    "vlc_dsp"
 #define AOUT_DSP_DEFAULT                "/dev/dsp"
 
+/* Default audio output format (AOUT_FMT_S16_NE = Native Endianess) */
+#define AOUT_FORMAT_DEFAULT             AOUT_FMT_S16_NE
+/* #define AOUT_FORMAT_DEFAULT          AOUT_FMT_S8 */
+/* #define AOUT_FORMAT_DEFAULT          AOUT_FMT_U8 */
+/* #define AOUT_FORMAT_DEFAULT          AOUT_FMT_S16_BE */
+/* #define AOUT_FORMAT_DEFAULT          AOUT_FMT_S16_LE */
+/* #define AOUT_FORMAT_DEFAULT          AOUT_FMT_U16_BE */
+/* #define AOUT_FORMAT_DEFAULT          AOUT_FMT_U16_LE */
+
 /* Environment variable for stereo, and default value */
 #define AOUT_STEREO_VAR                 "vlc_stereo"
 #define AOUT_STEREO_DEFAULT             1
 
+/* Volume */
+#define VOLUME_DEFAULT                  256
+#define VOLUME_STEP                     5
+#define VOLUME_MAX                      765
+
 /* Environment variable for output rate, and default value */
 #define AOUT_RATE_VAR                   "vlc_audio_rate"
 #define AOUT_RATE_DEFAULT               44100
 
+/* Number of audio output frames contained in an audio output fifo.
+ * (AOUT_FIFO_SIZE + 1) must be a power of 2, in order to optimise the
+ * %(AOUT_FIFO_SIZE + 1) operation with an &AOUT_FIFO_SIZE.
+ * With 511 we have at least 511*384/2/48000=2 seconds of sound */
+#define AOUT_FIFO_SIZE                  511
+
+/* Maximum number of audio fifos. The value of AOUT_MAX_FIFOS should be a power
+ * of two, in order to optimize the '/AOUT_MAX_FIFOS' and '*AOUT_MAX_FIFOS'
+ * operations with '>>' and '<<' (gcc changes this at compilation-time) */
+#define AOUT_MAX_FIFOS                  2
+
+/* Duration (in microseconds) of an audio output buffer should be :
+ * - short, in order to be able to play a new song very quickly (especially a
+ *   song from the interface)
+ * - long, in order to perform the buffer calculations as few as possible */
+#define AOUT_BUFFER_DURATION            100000
+
 /*****************************************************************************
  * Video configuration
  *****************************************************************************/
index 6f4045706b4ce2637e0be2e75cb312b2f5561c61..0cfb52241cc48cadbe1e307812337f904ae4a7b1 100644 (file)
@@ -97,7 +97,7 @@ int aout_BeOpen( aout_thread_t *p_aout )
     }
 
     /* Initialize some variables */
-    p_aout->i_format = AOUT_DEFAULT_FORMAT;
+    p_aout->i_format = AOUT_FORMAT_DEFAULT;
     p_aout->i_channels = 1 + main_GetIntVariable( AOUT_STEREO_VAR,
                                                   AOUT_STEREO_DEFAULT );
     p_aout->l_rate = main_GetIntVariable( AOUT_RATE_VAR, AOUT_RATE_DEFAULT );
index 77e2ba24ffb24ef70f97ae0c6d0463cfd5ed3425..bdf5072bc374015e28fca52bd413aec1474b27cb 100644 (file)
@@ -90,7 +90,7 @@ int aout_DspOpen( aout_thread_t *p_aout )
     }
 
     /* Initialize some variables */
-    p_aout->i_format = AOUT_DEFAULT_FORMAT;
+    p_aout->i_format = AOUT_FORMAT_DEFAULT;
     p_aout->psz_device = main_GetPszVariable( AOUT_DSP_VAR, AOUT_DSP_DEFAULT );
     p_aout->i_channels = 1 + main_GetIntVariable( AOUT_STEREO_VAR, AOUT_STEREO_DEFAULT );
     p_aout->l_rate     = main_GetIntVariable( AOUT_RATE_VAR, AOUT_RATE_DEFAULT );
index ec7a70dc027c2aabc1385c22756b4d4190f62f87..fb87e151c24c82949871dd91442bf275918aa3de 100644 (file)
@@ -53,7 +53,7 @@ typedef struct aout_sys_s
 int aout_DummyOpen( aout_thread_t *p_aout )
 {
     /* Initialize some variables */
-    p_aout->i_format = AOUT_DEFAULT_FORMAT;
+    p_aout->i_format = AOUT_FORMAT_DEFAULT;
     p_aout->i_channels = 1 + main_GetIntVariable( AOUT_STEREO_VAR, AOUT_STEREO_DEFAULT );
     p_aout->l_rate     = main_GetIntVariable( AOUT_RATE_VAR, AOUT_RATE_DEFAULT );
 
index 5456839b76dcd7b5c68656d19ddf0bc685e1dcc2..331994f85517ba22ca2b144ee6421f4c815993f3 100644 (file)
@@ -82,7 +82,7 @@ int aout_EsdOpen( aout_thread_t *p_aout )
     }
 
     /* Initialize some variables */
-    p_aout->i_format = AOUT_DEFAULT_FORMAT;
+    p_aout->i_format = AOUT_FORMAT_DEFAULT;
     p_aout->i_channels = 1 + main_GetIntVariable( AOUT_STEREO_VAR, AOUT_STEREO_DEFAULT );
     p_aout->l_rate     = main_GetIntVariable( AOUT_RATE_VAR, AOUT_RATE_DEFAULT );
 
index 3a61b699044de1aad039cc31c2530fa6eb30b6d6..16c00a43b61148d73e8bc71cbcaf1281c28cf534 100644 (file)
@@ -181,7 +181,7 @@ aout_thread_t *aout_CreateThread( int *pi_status )
     }
 
     /* Initialize the vomue level */
-    p_aout->vol = VOL;
+    p_aout->vol = VOLUME_DEFAULT;
     
     /* FIXME: maybe it would be cleaner to change SpawnThread prototype
      * see vout to handle status correctly ?? however, it is not critical since
index 9fcc08f8622d9092ef27b2bdda6cdb3f6a562fa9..259fa9c231895c4d979d71711c9b4609635e2a4d 100644 (file)
@@ -447,12 +447,12 @@ int intf_ProcessKey( intf_thread_t *p_intf, int g_key )
         intf_SelectChannel( p_intf, k_reply.param );
         break;
     case INTF_KEY_INC_VOLUME:                                                    /* volume + */
-        if( (p_main->p_aout != NULL) && (p_main->p_aout->vol < VOLMAX) )
-            p_main->p_aout->vol += VOLSTEP;
+        if( (p_main->p_aout != NULL) && (p_main->p_aout->vol < VOLUME_MAX) )
+            p_main->p_aout->vol += VOLUME_STEP;
         break;
     case INTF_KEY_DEC_VOLUME:                                                    /* volume - */
-        if( (p_main->p_aout != NULL) && (p_main->p_aout->vol > VOLSTEP) )
-            p_main->p_aout->vol -= VOLSTEP;
+        if( (p_main->p_aout != NULL) && (p_main->p_aout->vol > VOLUME_STEP) )
+            p_main->p_aout->vol -= VOLUME_STEP;
         break;
     case INTF_KEY_TOGGLE_VOLUME:                                                 /* toggle mute */
         if( (p_main->p_aout != NULL) && (p_main->p_aout->vol))
index 0817eada3c9d12c94b90f39b8efb6b9f279e32ef..6cf8bec35e23868f70107644ac4587230c6d4c62 100644 (file)
@@ -314,8 +314,8 @@ static int PlayAudio( int i_argc, intf_arg_t *p_argv )
     }
 
     /* Set default configuration */
-    fifo.i_channels = 1 + ( fifo.b_stereo = AOUT_DEFAULT_STEREO );
-    fifo.l_rate = AOUT_DEFAULT_RATE;
+    fifo.i_channels = 1 + ( fifo.b_stereo = AOUT_STEREO_DEFAULT );
+    fifo.l_rate = AOUT_RATE_DEFAULT;
 
     /* The channels and rate parameters are essential ! */
     /* Parse parameters - see command list above */