]> git.sesse.net Git - vlc/blobdiff - include/audio_output.h
* Fixed the BeOS compile typo.
[vlc] / include / audio_output.h
index b7301c1007d9317dababdcb0ca183330d96b61cf..a8f1d15ecae9dd05f99ca059e3e0bf8bb81dbea7 100644 (file)
@@ -2,7 +2,7 @@
  * audio_output.h : audio output thread interface
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: audio_output.h,v 1.33 2001/05/01 04:18:17 sam Exp $
+ * $Id: audio_output.h,v 1.37 2001/05/30 17:03:11 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
+/*****************************************************************************
+ * aout_bank_t, p_aout_bank (global variable)
+ *****************************************************************************
+ * This global variable is accessed by any function using the audio output.
+ *****************************************************************************/
+typedef struct aout_bank_s
+{
+    /* Array to all the audio outputs */
+    struct aout_thread_s *pp_aout[ AOUT_MAX_THREADS ];
+
+    int                    i_count;
+    vlc_mutex_t            lock;  /* Global lock */
+
+} aout_bank_t;
+
+extern aout_bank_t *p_aout_bank;
+
 /*****************************************************************************
  * aout_increment_t
  *****************************************************************************
@@ -143,7 +160,8 @@ typedef struct aout_thread_s
     int                 i_fd;
 
     /* The current volume */
-    int                 i_vol;
+    int                 i_volume;
+    int                 i_savedvolume;
     /* Format of the audio output samples */
     int                 i_format;
     /* Number of channels */
@@ -170,16 +188,24 @@ typedef struct aout_thread_s
 #define AOUT_FMT_U16_BE      0x00000100                    /* Big endian U16 */
 #define AOUT_FMT_AC3         0x00000400                 /* Dolby Digital AC3 */
 
-
 #ifdef WORDS_BIGENDIAN
 #define AOUT_FMT_S16_NE      AOUT_FMT_S16_BE
 #else
 #define AOUT_FMT_S16_NE      AOUT_FMT_S16_LE
 #endif
 
+/* Number of samples in an AC3 frame */
+#define AC3_FRAME_SIZE      1536
+
+/* Size of a frame for spdif output */
+#define SPDIF_FRAME_SIZE    6144
+
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
+void            aout_InitBank           ( void );
+void            aout_EndBank            ( void );
+
 aout_thread_t * aout_CreateThread       ( int *pi_status );
 void            aout_DestroyThread      ( aout_thread_t *, int * );